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 (opens new window)

# Public Properties

# handle

Type
string (opens new window), null (opens new window)
Default value
null

Handle

View source (opens new window)

# hasUrls

Type
boolean (opens new window)
Default value
false

Whether the volume has a public URL

View source (opens new window)

# name

Type
string (opens new window), null (opens new window)
Default value
null

Name

View source (opens new window)

# oldHandle

Type
string (opens new window), null (opens new window)
Default value
null

Old handle

View source (opens new window)

# uid

Type
string (opens new window), null (opens new window)
Default value
null

UID

View source (opens new window)

# url

Type
string (opens new window), null (opens new window)
Default value
null

The volume’s URL

View source (opens new window)

# Protected Properties

Property Description
showHasUrlSetting boolean (opens new window) – Whether the “Files in this filesystem have public URLs” setting should be shown.
showUrlSetting boolean (opens new window) – Whether the “Base URL” setting should be shown.

# showHasUrlSetting

Type
boolean (opens new window)
Default value
true
Since
4.5.0

Whether the “Files in this filesystem have public URLs” setting should be shown.

View source (opens new window)

# showUrlSetting

Type
boolean (opens new window)
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 (opens new window)