Skip to content

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.

View source

Public Properties ​

PropertyDescription
handlestring, null – Handle
hasUrlsboolean – Whether the volume has a public URL
namestring, null – Name
oldHandlestring, null – Old handle
uidstring, null – UID
urlstring, null – The volume’s URL

handle ​

Type
string, null
Default value
null

Handle

View source

hasUrls ​

Type
boolean
Default value
false

Whether the volume has a public URL

View source

name ​

Type
string, null
Default value
null

Name

View source

oldHandle ​

Type
string, null
Default value
null

Old handle

View source

uid ​

Type
string, null
Default value
null

UID

View source

url ​

Type
string, null
Default value
null

The volume’s URL

View source

Protected Properties ​

PropertyDescription
showHasUrlSettingboolean – Whether the “Files in this filesystem have public URLs” setting should be shown.
showUrlSettingboolean – 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.

View source

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.

View source