FolderInterface extends ResourceInterface
Interface for folders
Table of Contents
Constants
- ROLE_DEFAULT = 'default'
- Roles for folders
- ROLE_MOUNT = 'mount'
- ROLE_PROCESSING = 'processing'
- ROLE_READONLY_MOUNT = 'readonly-mount'
- ROLE_RECYCLER = 'recycler'
- ROLE_TEMPORARY = 'temporary'
- ROLE_USER_MOUNT = 'user-mount'
- ROLE_USERUPLOAD = 'userupload'
Methods
- delete() : bool
- Deletes this folder from its storage. This also means that this object becomes useless.
- getCreationTime() : int
- Returns the creation time of the folder as Unix timestamp
- getFile() : FileInterface|null
- Fetches a file from a folder, must be a direct descendant of a folder.
- getHashedIdentifier() : non-empty-string
- getIdentifier() : string
- getModificationTime() : int
- Returns the modification time of the folder as Unix timestamp
- getName() : string
- getParentFolder() : FolderInterface
- getStorage() : ResourceStorage
- getSubfolder() : Folder
- Returns the object for a subfolder of the current folder, if it exists.
- getSubfolders() : array<string|int, mixed>
- hasFile() : bool
- Checks if a file exists in this folder
- hasFolder() : bool
- Checks if a folder exists in this folder.
- rename() : $this
- Renames this folder.
Constants
ROLE_DEFAULT
Roles for folders
public
mixed
ROLE_DEFAULT
= 'default'
ROLE_MOUNT
public
mixed
ROLE_MOUNT
= 'mount'
ROLE_PROCESSING
public
mixed
ROLE_PROCESSING
= 'processing'
ROLE_READONLY_MOUNT
public
mixed
ROLE_READONLY_MOUNT
= 'readonly-mount'
ROLE_RECYCLER
public
mixed
ROLE_RECYCLER
= 'recycler'
ROLE_TEMPORARY
public
mixed
ROLE_TEMPORARY
= 'temporary'
ROLE_USER_MOUNT
public
mixed
ROLE_USER_MOUNT
= 'user-mount'
ROLE_USERUPLOAD
public
mixed
ROLE_USERUPLOAD
= 'userupload'
Methods
delete()
Deletes this folder from its storage. This also means that this object becomes useless.
public
delete() : bool
Return values
boolgetCreationTime()
Returns the creation time of the folder as Unix timestamp
public
getCreationTime() : int
Return values
intgetFile()
Fetches a file from a folder, must be a direct descendant of a folder.
public
getFile(string $fileName) : FileInterface|null
Parameters
- $fileName : string
Return values
FileInterface|nullgetHashedIdentifier()
public
getHashedIdentifier() : non-empty-string
Return values
non-empty-stringgetIdentifier()
public
getIdentifier() : string
Return values
stringgetModificationTime()
Returns the modification time of the folder as Unix timestamp
public
getModificationTime() : int
Return values
intgetName()
public
getName() : string
Return values
stringgetParentFolder()
public
getParentFolder() : FolderInterface
Return values
FolderInterfacegetStorage()
public
getStorage() : ResourceStorage
Return values
ResourceStoragegetSubfolder()
Returns the object for a subfolder of the current folder, if it exists.
public
getSubfolder(string $name) : Folder
Parameters
- $name : string
Return values
FoldergetSubfolders()
public
getSubfolders() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>hasFile()
Checks if a file exists in this folder
public
hasFile(string $name) : bool
Parameters
- $name : string
Return values
boolhasFolder()
Checks if a folder exists in this folder.
public
hasFolder(string $name) : bool
Parameters
- $name : string
Return values
boolrename()
Renames this folder.
public
rename(string $newName) : $this
Parameters
- $newName : string