FsTrait
- Type
- Trait
- Namespace
- craft\base
- Implemented by
- craft\base\Fs, craft\fs\Local, craft\fs\MissingFs, craft\fs\Temp
- Since
- 4.0.0
FsTrait implements the common methods and properties for filesystem classes.
Public Properties
Property | Description |
---|---|
handle | string, null – Handle |
hasUrls | boolean – Whether the volume has a public URL |
name | string, null – Name |
oldHandle | string, null – Old handle |
uid | string, null – UID |
url | string, null – The volume’s URL |
handle
Handle
hasUrls
- Type
- boolean
- Default value
false
Whether the volume has a public URL
name
Name
oldHandle
Old handle
uid
UID
url
The volume’s URL
Protected Properties
Property | Description |
---|---|
showHasUrlSetting | boolean – Whether the “Files in this filesystem have public URLs” setting should be shown. |
showUrlSetting | boolean – Whether the “Base URL” setting should be shown. |
showHasUrlSetting
- Type
- boolean
- Default value
true
- Since
- 4.5.0
Whether the “Files in this filesystem have public URLs” setting should be shown.
showUrlSetting
- Type
- boolean
- Default value
true
- Since
- 4.5.0
Whether the “Base URL” setting should be shown.
If this is false
, and the filesystem has a base URL, \craft\base\getRootUrl()
should be implemented directly, rather than storing the base URL on the craft\base\Fs::$url property.