‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\InaccessibleFolder Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\InaccessibleFolder:
TYPO3\CMS\Core\Resource\Folder TYPO3\CMS\Core\Resource\FolderInterface TYPO3\CMS\Core\Resource\ResourceInterface

Public Member Functions

 setName ($name)
 
 getPublicUrl ()
 
 getFiles ($start=0, $numberOfItems=0, $filterMode=self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS, $recursive=false, $sort='', $sortRev=false)
 
 getFileCount (array $filterMethods=[], $recursive=false)
 
 getSubfolder ($name)
 
 getSubfolders ($start=0, $numberOfItems=0, $filterMode=self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS, $recursive=false)
 
 addFile ($localFilePath, $fileName=null, $conflictMode=DuplicationBehavior::CANCEL)
 
 addUploadedFile (array $uploadedFileData, $conflictMode=DuplicationBehavior::CANCEL)
 
 rename ($newName)
 
 delete ($deleteRecursively=true)
 
 createFile ($fileName)
 
 createFolder ($folderName)
 
 copyTo (Folder $targetFolder, $targetFolderName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 moveTo (Folder $targetFolder, $targetFolderName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 hasFile ($name)
 
 hasFolder ($name)
 
 updateProperties (array $properties)
 
 setFileAndFolderNameFilters (array $filters)
 
 getModificationTime ()
 
 getCreationTime ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Resource\Folder
 __construct (ResourceStorage $storage, $identifier, $name)
 
 getName ()
 
string getReadablePath ($rootId=null)
 
 getStorage ()
 
non empty string getIdentifier ()
 
 getHashedIdentifier ()
 
string getCombinedIdentifier ()
 
 searchFiles (FileSearchDemand $searchDemand, int $filterMode=self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS)
 
 getSubfolder (string $name)
 
 rename (string $newName)
 
 hasFile (string $name)
 
 getFile (string $fileName)
 
 hasFolder (string $name)
 
bool checkActionPermission ($action)
 
string getRole ()
 
 getParentFolder ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Resource\FolderInterface
 getSubfolders ()
 
 delete ()
 

Protected Member Functions

 throwInaccessibleException ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Resource\Folder
array prepareFiltersInStorage ($filterMode)
 
 restoreBackedUpFiltersInStorage ($backedUpFilters)
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Resource\Folder
const FILTER_MODE_NO_FILTERS = 0
 
const FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS = 1
 
const FILTER_MODE_USE_STORAGE_FILTERS = 2
 
const FILTER_MODE_USE_OWN_FILTERS = 3
 
- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Resource\FolderInterface
const ROLE_DEFAULT = 'default'
 
const ROLE_RECYCLER = 'recycler'
 
const ROLE_PROCESSING = 'processing'
 
const ROLE_TEMPORARY = 'temporary'
 
const ROLE_USERUPLOAD = 'userupload'
 
const ROLE_MOUNT = 'mount'
 
const ROLE_READONLY_MOUNT = 'readonly-mount'
 
const ROLE_USER_MOUNT = 'user-mount'
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Resource\Folder
ResourceStorage $storage
 
string $identifier
 
string $name
 
callable[] $fileAndFolderNameFilters = array( )
 

Detailed Description

A representation for an inaccessible folder.

If a folder has execution rights you can list it's contents despite the access rights on the subfolders. If a subfolder has no rights it has to be shown anyhow, but marked as inaccessible.

Definition at line 29 of file InaccessibleFolder.php.

Member Function Documentation

◆ addFile()

TYPO3\CMS\Core\Resource\InaccessibleFolder::addFile (   $localFilePath,
  $fileName = null,
  $conflictMode = DuplicationBehavior::CANCEL 
)

Adds a file from the local server disk. If the file already exists and overwriting is disabled,

Parameters
string$localFilePath
string$fileName
string | DuplicationBehavior$conflictMode
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 134 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ addUploadedFile()

TYPO3\CMS\Core\Resource\InaccessibleFolder::addUploadedFile ( array  $uploadedFileData,
  $conflictMode = DuplicationBehavior::CANCEL 
)

Adds an uploaded file into the Storage.

Parameters
array$uploadedFileData‪contains information about the uploaded file given by $_FILES['file1']
string | DuplicationBehavior$conflictMode
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 147 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ copyTo()

TYPO3\CMS\Core\Resource\InaccessibleFolder::copyTo ( Folder  $targetFolder,
  $targetFolderName = null,
  $conflictMode = DuplicationBehavior::RENAME 
)

Copies folder to a target folder

Parameters
Folder$targetFolder‪Target folder to copy to.
string$targetFolderName‪an optional destination fileName
string | DuplicationBehavior$conflictMode
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 205 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ createFile()

TYPO3\CMS\Core\Resource\InaccessibleFolder::createFile (   $fileName)

Creates a new blank file

Parameters
string$fileName
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 180 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ createFolder()

TYPO3\CMS\Core\Resource\InaccessibleFolder::createFolder (   $folderName)

Creates a new folder

Parameters
string$folderName
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 191 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ delete()

TYPO3\CMS\Core\Resource\InaccessibleFolder::delete (   $deleteRecursively = true)

Deletes this folder from its storage. This also means that this object becomes useless.

Parameters
bool$deleteRecursively
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 169 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ getCreationTime()

TYPO3\CMS\Core\Resource\InaccessibleFolder::getCreationTime ( )

Returns the creation time of the file as Unix timestamp

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 272 of file InaccessibleFolder.php.

◆ getFileCount()

TYPO3\CMS\Core\Resource\InaccessibleFolder::getFileCount ( array  $filterMethods = [],
  $recursive = false 
)

Returns amount of all files within this folder, optionally filtered by the given pattern

Parameters
bool$recursive
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 94 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ getFiles()

TYPO3\CMS\Core\Resource\InaccessibleFolder::getFiles (   $start = 0,
  $numberOfItems = 0,
  $filterMode = self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS,
  $recursive = false,
  $sort = '',
  $sortRev = false 
)

Returns a list of files in this folder, optionally filtered. There are several filter modes available, see the FILTER_MODE_* constants for more information.

For performance reasons the returned items can also be limited to a given range

Parameters
int$start‪The item to start at
int$numberOfItems‪The number of items to return
int$filterMode‪The filter mode to use for the filelist.
bool$recursive
string$sort
bool$sortRev
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 82 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ getModificationTime()

TYPO3\CMS\Core\Resource\InaccessibleFolder::getModificationTime ( )

Returns the modification time of the file as Unix timestamp

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 267 of file InaccessibleFolder.php.

◆ getPublicUrl()

TYPO3\CMS\Core\Resource\InaccessibleFolder::getPublicUrl ( )

Returns a publicly accessible URL for this folder

WARNING: Access to the folder may be restricted by further means, e.g. some web-based authentication. You have to take care of this yourself.

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 63 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ getSubfolder()

TYPO3\CMS\Core\Resource\InaccessibleFolder::getSubfolder (   $name)

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

Parameters
string$name‪Name of the subfolder
Exceptions
Exception

Definition at line 105 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ getSubfolders()

TYPO3\CMS\Core\Resource\InaccessibleFolder::getSubfolders (   $start = 0,
  $numberOfItems = 0,
  $filterMode = self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS,
  $recursive = false 
)

Returns a list of subfolders

Parameters
int$start‪The item to start at
int$numberOfItems‪The number of items to return
int$filterMode‪The filter mode to use for the filelist.
bool$recursive
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 119 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ hasFile()

TYPO3\CMS\Core\Resource\InaccessibleFolder::hasFile (   $name)

Checks if a file exists in this folder

Parameters
string$name
Exceptions
Exception

Definition at line 229 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ hasFolder()

TYPO3\CMS\Core\Resource\InaccessibleFolder::hasFolder (   $name)

Checks if a folder exists in this folder.

Parameters
string$name
Exceptions
Exception

Definition at line 240 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ moveTo()

TYPO3\CMS\Core\Resource\InaccessibleFolder::moveTo ( Folder  $targetFolder,
  $targetFolderName = null,
  $conflictMode = DuplicationBehavior::RENAME 
)

Moves folder to a target folder

Parameters
Folder$targetFolder‪Target folder to move to.
string$targetFolderName‪an optional destination fileName
string | DuplicationBehavior$conflictMode
Exceptions
Exception

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 218 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ rename()

TYPO3\CMS\Core\Resource\InaccessibleFolder::rename (   $newName)

Renames this folder.

Parameters
string$newName
Exceptions
Exception

Definition at line 158 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ setFileAndFolderNameFilters()

TYPO3\CMS\Core\Resource\InaccessibleFolder::setFileAndFolderNameFilters ( array  $filters)

Sets the filters to use when listing files. These are only used if the filter mode is one of FILTER_MODE_USE_OWN_FILTERS and FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 262 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ setName()

TYPO3\CMS\Core\Resource\InaccessibleFolder::setName (   $name)

Sets a new name of the folder currently this does not trigger the "renaming process" as the name is more seen as a label

Parameters
string$name‪The new name

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 52 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().

◆ throwInaccessibleException()

◆ updateProperties()

TYPO3\CMS\Core\Resource\InaccessibleFolder::updateProperties ( array  $properties)

Updates the properties of this folder, e.g. after re-indexing or moving it.

NOTE: This method should not be called from outside the File Abstraction Layer (FAL)!

Parameters
array$properties

Reimplemented from TYPO3\CMS\Core\Resource\Folder.

Definition at line 253 of file InaccessibleFolder.php.

References TYPO3\CMS\Core\Resource\InaccessibleFolder\throwInaccessibleException().