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.
getFiles()  : mixed
Returns a list of files in this folder, based on filters and includes pagination.
getHashedIdentifier()  : non-empty-string
getIdentifier()  : string
getModificationTime()  : int
Returns the modification time of the folder as Unix timestamp
getName()  : string
getParentFolder()  : FolderInterface
getReadablePath()  : string
Returns a string of the path to this folder, relative to the root of the storage
getRole()  : string
Some folders have special roles in TYPO3, see the constants of this interface.
getStorage()  : ResourceStorage
getSubfolder()  : FolderInterface
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()  : self
Renames this folder.
searchFiles()  : FileSearchResultInterface
Returns a list of files in this folder, based on SearchDemand.

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
bool

getCreationTime()

Returns the creation time of the folder as Unix timestamp

public getCreationTime() : int
Return values
int

getFile()

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|null

getFiles()

Returns a list of files in this folder, based on filters and includes pagination.

public getFiles([int $start = 0 ][, int $numberOfItems = 0 ][, int $filterMode = Folder::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS ][, bool $recursive = false ][, string $sort = '' ][, bool $sortRev = false ]) : mixed
Parameters
$start : int = 0
$numberOfItems : int = 0
$filterMode : int = Folder::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS
$recursive : bool = false
$sort : string = ''
$sortRev : bool = false

getHashedIdentifier()

public getHashedIdentifier() : non-empty-string
Return values
non-empty-string

getIdentifier()

public getIdentifier() : string
Return values
string

getModificationTime()

Returns the modification time of the folder as Unix timestamp

public getModificationTime() : int
Return values
int

getName()

public getName() : string
Return values
string

getReadablePath()

Returns a string of the path to this folder, relative to the root of the storage

public getReadablePath([string|null $rootId = null ]) : string
Parameters
$rootId : string|null = null
Return values
string

getRole()

Some folders have special roles in TYPO3, see the constants of this interface.

public getRole() : string
Return values
string

getSubfolder()

Returns the object for a subfolder of the current folder, if it exists.

public getSubfolder(string $name) : FolderInterface
Parameters
$name : string
Return values
FolderInterface

getSubfolders()

public getSubfolders() : array<string|int, mixed>
Tags
phpstan-return

array<array-key, FolderInterface>

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
bool

hasFolder()

Checks if a folder exists in this folder.

public hasFolder(string $name) : bool
Parameters
$name : string
Return values
bool

rename()

Renames this folder.

public rename(string $newName) : self
Parameters
$newName : string
Return values
self

        
On this page

Search results