TYPO3 CMS  TYPO3_7-6
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 ($relativeToCurrentScript=false)
 
 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)
 
- Public Member Functions inherited from TYPO3\CMS\Core\Resource\Folder
 __construct (ResourceStorage $storage, $identifier, $name)
 
 getName ()
 
 getReadablePath ($rootId=null)
 
 setName ($name)
 
 getStorage ()
 
 getIdentifier ()
 
 getHashedIdentifier ()
 
 getCombinedIdentifier ()
 
 getPublicUrl ($relativeToCurrentScript=false)
 
 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)
 
 checkActionPermission ($action)
 
 updateProperties (array $properties)
 
 setFileAndFolderNameFilters (array $filters)
 
 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
 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
 $storage
 
 $identifier
 
 $name
 
 $fileAndFolderNameFilters = []
 

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 25 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$conflictModea value of the enumeration
Returns
File The file object

Definition at line 138 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$uploadedFileDatacontains information about the uploaded file given by $_FILES['file1']
string$conflictModea value of the enumeration
Returns
File The file object

Definition at line 150 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$targetFolderTarget folder to copy to.
string$targetFolderNamean optional destination fileName
string$conflictModea value of the enumeration
Returns
Folder New (copied) folder object.

Definition at line 207 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
Returns
File The new file object

Definition at line 183 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
Returns
Folder The new folder object

Definition at line 194 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
Returns
bool TRUE if deletion succeeded

Definition at line 172 of file InaccessibleFolder.php.

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

◆ 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
array$filterMethods
bool$recursive
Returns
int

Definition at line 97 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$startThe item to start at
int$numberOfItemsThe number of items to return
int$filterModeThe filter mode to use for the filelist.
bool$recursive
string$sort
bool$sortRev
Returns
File[]

Definition at line 83 of file InaccessibleFolder.php.

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

◆ getPublicUrl()

TYPO3\CMS\Core\Resource\InaccessibleFolder::getPublicUrl (   $relativeToCurrentScript = false)

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.

Parameters
bool$relativeToCurrentScriptDetermines whether the URL returned should be relative to the current script, in case it is relative at all (only for the LocalDriver)
Returns
string

Definition at line 64 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$nameName of the subfolder
Exceptions

Implements TYPO3\CMS\Core\Resource\FolderInterface.

Definition at line 110 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$startThe item to start at
int$numberOfItemsThe number of items to return
int$filterModeThe filter mode to use for the filelist.
bool$recursive
Returns
Folder[]

Definition at line 124 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
Returns
bool

Implements TYPO3\CMS\Core\Resource\FolderInterface.

Definition at line 231 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
Returns
bool

Implements TYPO3\CMS\Core\Resource\FolderInterface.

Definition at line 242 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$targetFolderTarget folder to move to.
string$targetFolderNamean optional destination fileName
string$conflictModea value of the enumeration
Returns
Folder New (copied) folder object.

Definition at line 220 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
Returns
Folder

Implements TYPO3\CMS\Core\Resource\FolderInterface.

Definition at line 161 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

Parameters
array$filters

Definition at line 267 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$nameThe new name
Returns
void

Definition at line 50 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
Returns
void

Definition at line 256 of file InaccessibleFolder.php.

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