TYPO3 CMS  TYPO3_8-7
TYPO3\CMS\Core\Resource\ResourceStorage Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\ResourceStorage:
TYPO3\CMS\Core\Resource\ResourceStorageInterface

Public Member Functions

 __construct (Driver\DriverInterface $driver, array $storageRecord)
 
 getConfiguration ()
 
 setConfiguration (array $configuration)
 
 getStorageRecord ()
 
 setDriver (Driver\DriverInterface $driver)
 
 getName ()
 
 getUid ()
 
 hasChildren ()
 
 getCapabilities ()
 
 isPublic ()
 
 isWritable ()
 
 isBrowsable ()
 
 usesCaseSensitiveIdentifiers ()
 
 isOnline ()
 
 autoExtractMetadataEnabled ()
 
 markAsPermanentlyOffline ()
 
 markAsTemporaryOffline ()
 
 addFileMount ($folderIdentifier, $additionalData=[])
 
 getFileMounts ()
 
 setEvaluatePermissions ($evaluatePermissions)
 
 getEvaluatePermissions ()
 
 setUserPermissions (array $userPermissions)
 
 checkUserActionPermission ($action, $type)
 
 checkFileActionPermission ($action, FileInterface $file)
 
 checkFolderActionPermission ($action, Folder $folder=null)
 
 checkFileAndFolderNameFilters (ResourceInterface $fileOrFolder)
 
 sanitizeFileName ($fileName, Folder $targetFolder=null)
 
 addFile ($localFilePath, Folder $targetFolder, $targetFileName='', $conflictMode=DuplicationBehavior::RENAME, $removeOriginal=true)
 
 updateProcessedFile ($localFilePath, ProcessedFile $processedFile, Folder $processingFolder=null)
 
 hashFile (FileInterface $fileObject, $hash)
 
 hashFileByIdentifier ($fileIdentifier, $hash)
 
 getPublicUrl (ResourceInterface $resourceObject, $relativeToCurrentScript=false)
 
 processFile (FileInterface $fileObject, $context, array $configuration)
 
 getFileForLocalProcessing (FileInterface $fileObject, $writable=true)
 
 getFile ($identifier)
 
 getFileInfo (FileInterface $fileObject)
 
 getFileInfoByIdentifier ($identifier, array $propertiesToExtract=[])
 
 unsetFileAndFolderNameFilters ()
 
 resetFileAndFolderNameFiltersToDefault ()
 
 getFileAndFolderNameFilters ()
 
 setFileAndFolderNameFilters (array $filters)
 
 addFileAndFolderNameFilter ($filter)
 
 getFolderIdentifierFromFileIdentifier ($fileIdentifier)
 
 getFileInFolder ($fileName, Folder $folder)
 
 getFilesInFolder (Folder $folder, $start=0, $maxNumberOfItems=0, $useFilters=true, $recursive=false, $sort='', $sortRev=false)
 
 getFileIdentifiersInFolder ($folderIdentifier, $useFilters=true, $recursive=false)
 
 countFilesInFolder (Folder $folder, $useFilters=true, $recursive=false)
 
 getFolderIdentifiersInFolder ($folderIdentifier, $useFilters=true, $recursive=false)
 
 hasFile ($identifier)
 
 isProcessingFolder (Folder $folder)
 
 hasFileInFolder ($fileName, Folder $folder)
 
 getFileContents ($file)
 
 dumpFileContents (FileInterface $file, $asDownload=false, $alternativeFilename=null, $overrideMimeType=null)
 
 setFileContents (AbstractFile $file, $contents)
 
 createFile ($fileName, Folder $targetFolderObject)
 
 deleteFile ($fileObject)
 
 copyFile (FileInterface $file, Folder $targetFolder, $targetFileName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 moveFile ($file, $targetFolder, $targetFileName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 renameFile ($file, $targetFileName, $conflictMode=DuplicationBehavior::RENAME)
 
 replaceFile (FileInterface $file, $localFilePath)
 
 addUploadedFile (array $uploadedFileData, Folder $targetFolder=null, $targetFileName=null, $conflictMode=DuplicationBehavior::CANCEL)
 
 moveFolder (Folder $folderToMove, Folder $targetParentFolder, $newFolderName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 copyFolder (FolderInterface $folderToCopy, FolderInterface $targetParentFolder, $newFolderName=null, $conflictMode=DuplicationBehavior::RENAME)
 
 renameFolder ($folderObject, $newName)
 
 deleteFolder ($folderObject, $deleteRecursively=false)
 
 getFolderInFolder ($folderName, Folder $parentFolder, $returnInaccessibleFolderObject=false)
 
 getFoldersInFolder (Folder $folder, $start=0, $maxNumberOfItems=0, $useFilters=true, $recursive=false, $sort='', $sortRev=false)
 
 countFoldersInFolder (Folder $folder, $useFilters=true, $recursive=false)
 
 hasFolder ($identifier)
 
 hasFolderInFolder ($folderName, Folder $folder)
 
 createFolder ($folderName, Folder $parentFolder=null)
 
 getFolderInfo (Folder $folder)
 
 getDefaultFolder ()
 
 getFolder ($identifier, $returnInaccessibleFolderObject=false)
 
 isWithinProcessingFolder ($identifier)
 
 isWithinFolder (Folder $folder, ResourceInterface $resource)
 
 getRootLevelFolder ($respectFileMounts=true)
 
 getRole (FolderInterface $folder)
 
 getProcessingFolder (File $file=null)
 
 getDriverType ()
 
 setDefault ($isDefault)
 
 isDefault ()
 
 getResourceFactoryInstance ()
 

Public Attributes

const PROCESSING_FOLDER_LEVELS = 2
 
- Public Attributes inherited from TYPO3\CMS\Core\Resource\ResourceStorageInterface
const SIGNAL_SanitizeFileName = 'sanitizeFileName'
 
const SIGNAL_PreFileAdd = 'preFileAdd'
 
const SIGNAL_PostFileAdd = 'postFileAdd'
 
const SIGNAL_PreFileCreate = 'preFileCreate'
 
const SIGNAL_PostFileCreate = 'postFileCreate'
 
const SIGNAL_PreFileCopy = 'preFileCopy'
 
const SIGNAL_PostFileCopy = 'postFileCopy'
 
const SIGNAL_PreFileMove = 'preFileMove'
 
const SIGNAL_PostFileMove = 'postFileMove'
 
const SIGNAL_PreFileDelete = 'preFileDelete'
 
const SIGNAL_PostFileDelete = 'postFileDelete'
 
const SIGNAL_PreFileRename = 'preFileRename'
 
const SIGNAL_PostFileRename = 'postFileRename'
 
const SIGNAL_PreFileReplace = 'preFileReplace'
 
const SIGNAL_PostFileReplace = 'postFileReplace'
 
const SIGNAL_PreFileSetContents = 'preFileSetContents'
 
const SIGNAL_PostFileSetContents = 'postFileSetContents'
 
const SIGNAL_PreFolderAdd = 'preFolderAdd'
 
const SIGNAL_PostFolderAdd = 'postFolderAdd'
 
const SIGNAL_PreFolderCopy = 'preFolderCopy'
 
const SIGNAL_PostFolderCopy = 'postFolderCopy'
 
const SIGNAL_PreFolderMove = 'preFolderMove'
 
const SIGNAL_PostFolderMove = 'postFolderMove'
 
const SIGNAL_PreFolderDelete = 'preFolderDelete'
 
const SIGNAL_PostFolderDelete = 'postFolderDelete'
 
const SIGNAL_PreFolderRename = 'preFolderRename'
 
const SIGNAL_PostFolderRename = 'postFolderRename'
 
const SIGNAL_PreGeneratePublicUrl = 'preGeneratePublicUrl'
 
const CAPABILITY_BROWSABLE = 1
 
const CAPABILITY_PUBLIC = 2
 
const CAPABILITY_WRITABLE = 4
 
const DEFAULT_ProcessingFolder = '_processed_'
 

Protected Member Functions

 getDriver ()
 
 hasCapability ($capability)
 
 checkFileExtensionPermission ($fileName)
 
 assureFolderReadPermission (Folder $folder=null)
 
 assureFolderDeletePermission (Folder $folder, $checkDeleteRecursively)
 
 assureFileReadPermission (FileInterface $file)
 
 assureFileWritePermissions (FileInterface $file)
 
 assureFileReplacePermissions (FileInterface $file)
 
 assureFileDeletePermissions (FileInterface $file)
 
 assureFileAddPermissions ($targetFolder, $targetFileName)
 
 assureFileUploadPermissions ($localFilePath, $targetFolder, $targetFileName, $uploadedFileSize)
 
 assureFileMovePermissions (FileInterface $file, Folder $targetFolder, $targetFileName)
 
 assureFileRenamePermissions (FileInterface $file, $targetFileName)
 
 assureFileCopyPermissions (FileInterface $file, Folder $targetFolder, $targetFileName)
 
 assureFolderCopyPermissions (FolderInterface $folderToCopy, FolderInterface $targetParentFolder)
 
 assureFolderMovePermissions (FolderInterface $folderToMove, FolderInterface $targetParentFolder)
 
 moveFolderBetweenStorages (Folder $folderToMove, Folder $targetParentFolder, $newFolderName)
 
 copyFolderBetweenStorages (Folder $folderToCopy, Folder $targetParentFolder, $newFolderName)
 
 emitSanitizeFileNameSignal ($fileName, Folder $targetFolder)
 
 emitPreFileAddSignal ($targetFileName, Folder $targetFolder, $sourceFilePath)
 
 emitPostFileAddSignal (FileInterface $file, Folder $targetFolder)
 
 emitPreFileCopySignal (FileInterface $file, Folder $targetFolder)
 
 emitPostFileCopySignal (FileInterface $file, Folder $targetFolder)
 
 emitPreFileMoveSignal (FileInterface $file, Folder $targetFolder, string $targetFileName)
 
 emitPostFileMoveSignal (FileInterface $file, Folder $targetFolder, FolderInterface $originalFolder)
 
 emitPreFileRenameSignal (FileInterface $file, $targetFolder)
 
 emitPostFileRenameSignal (FileInterface $file, $sanitizedTargetFileName)
 
 emitPreFileReplaceSignal (FileInterface $file, $localFilePath)
 
 emitPostFileReplaceSignal (FileInterface $file, $localFilePath)
 
 emitPreFileCreateSignal (string $fileName, Folder $targetFolder)
 
 emitPostFileCreateSignal ($newFileIdentifier, Folder $targetFolder)
 
 emitPreFileDeleteSignal (FileInterface $file)
 
 emitPostFileDeleteSignal (FileInterface $file)
 
 emitPreFileSetContentsSignal (FileInterface $file, $content)
 
 emitPostFileSetContentsSignal (FileInterface $file, $content)
 
 emitPreFolderAddSignal (Folder $targetFolder, $name)
 
 emitPostFolderAddSignal (Folder $folder)
 
 emitPreFolderCopySignal (Folder $folder, Folder $targetFolder, $newName)
 
 emitPostFolderCopySignal (Folder $folder, Folder $targetFolder, $newName)
 
 emitPreFolderMoveSignal (Folder $folder, Folder $targetFolder, $newName)
 
 emitPostFolderMoveSignal (Folder $folder, Folder $targetFolder, $newName, Folder $originalFolder)
 
 emitPreFolderRenameSignal (Folder $folder, $newName)
 
 emitPostFolderRenameSignal (Folder $folder, $newName)
 
 emitPreFolderDeleteSignal (Folder $folder)
 
 emitPostFolderDeleteSignal (Folder $folder)
 
 emitPreGeneratePublicUrlSignal (ResourceInterface $resourceObject, $relativeToCurrentScript, array $urlData)
 
 getUniqueName (FolderInterface $folder, $theFile, $dontCheckForUnique=false)
 
 getSignalSlotDispatcher ()
 
 getObjectManager ()
 
 getFileFactory ()
 
 getFileIndexRepository ()
 
 getFileProcessingService ()
 
 getNestedProcessingFolder (File $file, Folder $rootProcessingFolder)
 
 getNamesForNestedProcessingFolder ($fileIdentifier, $levels)
 
 getIndexer ()
 
 getBackendUser ()
 
 getNearestRecyclerFolder (FileInterface $file)
 

Protected Attributes

 $driver
 
 $storageRecord
 
 $configuration
 
 $fileProcessingService
 
 $evaluatePermissions = false
 
 $fileMounts = []
 
 $userPermissions = []
 
 $capabilities
 
 $signalSlotDispatcher
 
 $processingFolder
 
 $processingFolders
 
 $isOnline = null
 
 $isDefault = false
 
 $fileAndFolderNameFilters = []
 

Detailed Description

A "mount point" inside the TYPO3 file handling.

A "storage" object handles

  • abstraction to the driver
  • permissions (from the driver, and from the user, + capabilities)
  • an entry point for files, folders, and for most other operations

== Driver entry point The driver itself, that does the actual work on the file system, is inside the storage but completely shadowed by the storage, as the storage also handles the abstraction to the driver

The storage can be on the local system, but can also be on a remote system. The combination of driver + configurable capabilities (storage is read-only e.g.) allows for flexible uses.

== Permission system As all requests have to run through the storage, the storage knows about the permissions of a BE/FE user, the file permissions / limitations of the driver and has some configurable capabilities. Additionally, a BE user can use "filemounts" (known from previous installations) to limit his/her work-zone to only a subset (identifier and its subfolders/subfolders) of the user itself.

Check 1: "User Permissions" [is the user allowed to write a file) [is the user allowed to write a file] Check 2: "File Mounts" of the User (act as subsets / filters to the identifiers) [is the user allowed to do something in this folder?] Check 3: "Capabilities" of Storage (then: of Driver) [is the storage/driver writable?] Check 4: "File permissions" of the Driver [is the folder writable?]

Definition at line 61 of file ResourceStorage.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addFile()

TYPO3\CMS\Core\Resource\ResourceStorage::addFile (   $localFilePath,
Folder  $targetFolder,
  $targetFileName = '',
  $conflictMode = DuplicationBehavior::RENAME,
  $removeOriginal = true 
)

Moves a file from the local filesystem to this storage.

Parameters
string$localFilePathThe file on the server's hard disk to add
Folder$targetFolderThe target folder where the file should be added
string$targetFileNameThe name of the file to be add, If not set, the local file name is used
string$conflictModea value of the DuplicationBehavior enumeration
bool$removeOriginalif set the original file will be removed after successful operation
Exceptions

Definition at line 1185 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFileAddPermissions(), TYPO3\CMS\Core\Resource\ResourceStorage\autoExtractMetadataEnabled(), TYPO3\CMS\Core\Utility\PathUtility\basename(), TYPO3\CMS\Core\Resource\DuplicationBehavior\CANCEL, TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileAddSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileAddSignal(), TYPO3\CMS\Core\Utility\PathUtility\getCanonicalPath(), TYPO3\CMS\Core\Resource\ResourceStorage\getDefaultFolder(), TYPO3\CMS\Core\Resource\Folder\getIdentifier(), TYPO3\CMS\Core\Resource\ResourceStorage\getIndexer(), TYPO3\CMS\Core\Resource\ResourceStorage\getResourceFactoryInstance(), TYPO3\CMS\Core\Resource\ResourceStorage\getUid(), TYPO3\CMS\Core\Resource\ResourceStorage\getUniqueName(), TYPO3\CMS\Core\Resource\DuplicationBehavior\RENAME, TYPO3\CMS\Core\Resource\DuplicationBehavior\REPLACE, and TYPO3\CMS\Core\Resource\ResourceStorage\sanitizeFileName().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addUploadedFile().

◆ addFileAndFolderNameFilter()

TYPO3\CMS\Core\Resource\ResourceStorage::addFileAndFolderNameFilter (   $filter)
Parameters
callable$filter

Definition at line 1462 of file ResourceStorage.php.

◆ addFileMount()

TYPO3\CMS\Core\Resource\ResourceStorage::addFileMount (   $folderIdentifier,
  $additionalData = [] 
)

Adds a filemount as a "filter" for users to only work on a subset of a storage object

Parameters
string$folderIdentifier
array$additionalData
Exceptions
Exception

Definition at line 447 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getResourceFactoryInstance().

Referenced by TYPO3\CMS\Core\Resource\Security\StoragePermissionsAspect\addFileMountsToStorage().

◆ addUploadedFile()

TYPO3\CMS\Core\Resource\ResourceStorage::addUploadedFile ( array  $uploadedFileData,
Folder  $targetFolder = null,
  $targetFileName = null,
  $conflictMode = DuplicationBehavior::CANCEL 
)

Adds an uploaded file into the Storage. Previously in ::file_upload()

Parameters
array$uploadedFileDatacontains information about the uploaded file given by $_FILES['file1']
Folder$targetFolderthe target folder
string$targetFileNamethe file name to be written
string$conflictModea value of the DuplicationBehavior enumeration
Returns
FileInterface The file object

Definition at line 1986 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\addFile(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFileUploadPermissions(), TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Core\Resource\ResourceStorage\getDefaultFolder(), TYPO3\CMS\Core\Resource\ResourceStorage\getFileInFolder(), TYPO3\CMS\Core\Resource\Folder\getFiles(), TYPO3\CMS\Core\Resource\Folder\getSubfolders(), TYPO3\CMS\Core\Resource\ResourceStorage\hasFileInFolder(), TYPO3\CMS\Core\Resource\DuplicationBehavior\REPLACE, and TYPO3\CMS\Core\Resource\ResourceStorage\replaceFile().

◆ assureFileAddPermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::assureFileAddPermissions (   $targetFolder,
  $targetFileName 
)
protected

Checks if a file/user has the permission to be written to a Folder/Storage. If not, throws an exception.

Parameters
Folder$targetFolderThe target folder where the file should be written
string$targetFileNameThe file name which should be written into the storage
Exceptions
Exception

Definition at line 934 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\checkFileExtensionPermission(), TYPO3\CMS\Core\Resource\ResourceStorage\checkFolderActionPermission(), TYPO3\CMS\Core\Resource\ResourceStorage\checkUserActionPermission(), and TYPO3\CMS\Core\Resource\ResourceStorage\getUid().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addFile(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFileUploadPermissions(), and TYPO3\CMS\Core\Resource\ResourceStorage\createFile().

◆ assureFileCopyPermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::assureFileCopyPermissions ( FileInterface  $file,
Folder  $targetFolder,
  $targetFileName 
)
protected

◆ assureFileDeletePermissions()

◆ assureFileMovePermissions()

◆ assureFileReadPermission()

TYPO3\CMS\Core\Resource\ResourceStorage::assureFileReadPermission ( FileInterface  $file)
protected

◆ assureFileRenamePermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::assureFileRenamePermissions ( FileInterface  $file,
  $targetFileName 
)
protected

◆ assureFileReplacePermissions()

◆ assureFileUploadPermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::assureFileUploadPermissions (   $localFilePath,
  $targetFolder,
  $targetFileName,
  $uploadedFileSize 
)
protected

Checks if a file has the permission to be uploaded to a Folder/Storage. If not, throws an exception.

Parameters
string$localFilePaththe temporary file name from $_FILES['file1']['tmp_name']
Folder$targetFolderThe target folder where the file should be uploaded
string$targetFileNamethe destination file name $_FILES['file1']['name']
int$uploadedFileSize
Exceptions
Exception

Definition at line 965 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFileAddPermissions(), and TYPO3\CMS\Core\Utility\GeneralUtility\getMaxUploadFileSize().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addUploadedFile().

◆ assureFileWritePermissions()

◆ assureFolderCopyPermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::assureFolderCopyPermissions ( FolderInterface  $folderToCopy,
FolderInterface  $targetParentFolder 
)
protected

◆ assureFolderDeletePermission()

TYPO3\CMS\Core\Resource\ResourceStorage::assureFolderDeletePermission ( Folder  $folder,
  $checkDeleteRecursively 
)
protected

Assures delete permission for given folder.

Parameters
Folder$folderIf a folder is given, mountpoints are checked. If not only user folder delete permissions are checked.
bool$checkDeleteRecursively
Exceptions
Exception

Definition at line 812 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\checkFolderActionPermission(), TYPO3\CMS\Core\Resource\ResourceStorage\checkUserActionPermission(), and TYPO3\CMS\Core\Resource\Folder\getName().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\deleteFolder().

◆ assureFolderMovePermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::assureFolderMovePermissions ( FolderInterface  $folderToMove,
FolderInterface  $targetParentFolder 
)
protected

Check if a file has the permission to be copied on a File/Folder/Storage, if not throw an exception

Parameters
FolderInterface$folderToMove
FolderInterface$targetParentFolder
Exceptions

Definition at line 1124 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\checkFolderActionPermission(), TYPO3\CMS\Core\Resource\ResourceInterface\getIdentifier(), TYPO3\CMS\Core\Resource\ResourceInterface\getStorage(), and TYPO3\CMS\Core\Resource\ResourceStorage\getUid().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\moveFolder().

◆ assureFolderReadPermission()

◆ autoExtractMetadataEnabled()

TYPO3\CMS\Core\Resource\ResourceStorage::autoExtractMetadataEnabled ( )

Returns TRUE if auto extracting of metadata is enabled

Returns
bool

Definition at line 393 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addFile(), and TYPO3\CMS\Core\Resource\ResourceStorage\replaceFile().

◆ checkFileActionPermission()

TYPO3\CMS\Core\Resource\ResourceStorage::checkFileActionPermission (   $action,
FileInterface  $file 
)

Checks if a file operation (= action) is allowed on a File/Folder/Storage (= subject).

This method, by design, does not throw exceptions or do logging. Besides the usage from other methods in this class, it is also used by the Filelist UI to check whether an action is allowed and whether action related UI elements should thus be shown (move icon, edit icon, etc.)

Parameters
string$actionaction, can be read, write, delete, editMeta
FileInterface$file
Returns
bool

Definition at line 604 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\checkFileExtensionPermission(), TYPO3\CMS\Core\Resource\ResourceStorage\checkUserActionPermission(), TYPO3\CMS\Core\Resource\ResourceInterface\getIdentifier(), TYPO3\CMS\Core\Resource\ResourceInterface\getName(), and TYPO3\CMS\Core\Resource\ResourceStorage\isWritable().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\assureFileDeletePermissions(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFileReadPermission(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFileRenamePermissions(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFileReplacePermissions(), and TYPO3\CMS\Core\Resource\ResourceStorage\assureFileWritePermissions().

◆ checkFileAndFolderNameFilters()

TYPO3\CMS\Core\Resource\ResourceStorage::checkFileAndFolderNameFilters ( ResourceInterface  $fileOrFolder)

◆ checkFileExtensionPermission()

◆ checkFolderActionPermission()

◆ checkUserActionPermission()

TYPO3\CMS\Core\Resource\ResourceStorage::checkUserActionPermission (   $action,
  $type 
)

◆ copyFile()

TYPO3\CMS\Core\Resource\ResourceStorage::copyFile ( FileInterface  $file,
Folder  $targetFolder,
  $targetFileName = null,
  $conflictMode = DuplicationBehavior::RENAME 
)

Previously in ::func_copy() copies a source file (from any location) in to the target folder, the latter has to be part of this storage

Parameters
FileInterface$file
Folder$targetFolder
string$targetFileNamean optional destination fileName
string$conflictModea value of the DuplicationBehavior enumeration
Exceptions

Definition at line 1800 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileCopySignal(), TYPO3\CMS\Core\Resource\ResourceStorage\getResourceFactoryInstance(), TYPO3\CMS\Core\Resource\ResourceStorage\getUid(), TYPO3\CMS\Core\Resource\ResourceStorage\getUniqueName(), and TYPO3\CMS\Core\Resource\DuplicationBehavior\RENAME.

◆ copyFolder()

◆ copyFolderBetweenStorages()

TYPO3\CMS\Core\Resource\ResourceStorage::copyFolderBetweenStorages ( Folder  $folderToCopy,
Folder  $targetParentFolder,
  $newFolderName 
)
protected

Copies a folder between storages.

Parameters
Folder$folderToCopy
Folder$targetParentFolder
string$newFolderName
Returns
bool
Exceptions
NotImplementedMethodException

Definition at line 2154 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\copyFolder().

◆ countFilesInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::countFilesInFolder ( Folder  $folder,
  $useFilters = true,
  $recursive = false 
)
Parameters
Folder$folder
bool$useFilters
bool$recursive
Returns
int Number of files in folder
Exceptions
Exception

Definition at line 1552 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFolderReadPermission(), and TYPO3\CMS\Core\Resource\Folder\getIdentifier().

◆ countFoldersInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::countFoldersInFolder ( Folder  $folder,
  $useFilters = true,
  $recursive = false 
)
Parameters
Folder$folder
bool$useFilters
bool$recursive
Returns
int Number of subfolders
Exceptions
Exception

Definition at line 2290 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFolderReadPermission(), and TYPO3\CMS\Core\Resource\Folder\getIdentifier().

◆ createFile()

TYPO3\CMS\Core\Resource\ResourceStorage::createFile (   $fileName,
Folder  $targetFolderObject 
)

◆ createFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::createFolder (   $folderName,
Folder  $parentFolder = null 
)

Creates a new folder.

previously in ::func_newfolder()

Parameters
string$folderNameThe new folder name
Folder$parentFolder(optional) the parent folder to create the new folder inside of. If not given, the root folder is used
Returns
Folder
Exceptions
Exception

Definition at line 2335 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\checkFolderActionPermission(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFolderAddSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFolderAddSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\getDriver(), TYPO3\CMS\Core\Resource\ResourceStorage\getFolder(), and TYPO3\CMS\Core\Resource\ResourceStorage\getRootLevelFolder().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getProcessingFolder().

◆ deleteFile()

◆ deleteFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::deleteFolder (   $folderObject,
  $deleteRecursively = false 
)

◆ dumpFileContents()

TYPO3\CMS\Core\Resource\ResourceStorage::dumpFileContents ( FileInterface  $file,
  $asDownload = false,
  $alternativeFilename = null,
  $overrideMimeType = null 
)

Outputs file Contents, clears output buffer first and sends headers accordingly.

Parameters
FileInterface$file
bool$asDownloadIf set Content-Disposition attachment is sent, inline otherwise
string$alternativeFilenamethe filename for the download (if $asDownload is set)
string$overrideMimeTypeIf set this will be used as Content-Type header instead of the automatically detected mime type.

Definition at line 1671 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceInterface\getIdentifier(), TYPO3\CMS\Core\Resource\FileInterface\getMimeType(), TYPO3\CMS\Core\Resource\ResourceInterface\getName(), and TYPO3\CMS\Core\Resource\FileInterface\getSize().

◆ emitPostFileAddSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFileAddSignal ( FileInterface  $file,
Folder  $targetFolder 
)
protected

Emits the file post-add signal.

Parameters
FileInterface$file
Folder$targetFolder

Definition at line 2504 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addFile().

◆ emitPostFileCopySignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFileCopySignal ( FileInterface  $file,
Folder  $targetFolder 
)
protected

Emits the file post-copy signal.

Parameters
FileInterface$file
Folder$targetFolder

Definition at line 2526 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\copyFile().

◆ emitPostFileCreateSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFileCreateSignal (   $newFileIdentifier,
Folder  $targetFolder 
)
protected

Emits the file post-create signal

Parameters
string$newFileIdentifier
Folder$targetFolder

Definition at line 2616 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\createFile().

◆ emitPostFileDeleteSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFileDeleteSignal ( FileInterface  $file)
protected

Emits the file post-deletion signal

Parameters
FileInterface$file

Definition at line 2636 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

◆ emitPostFileMoveSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFileMoveSignal ( FileInterface  $file,
Folder  $targetFolder,
FolderInterface  $originalFolder 
)
protected

Emits the file post-move signal.

Parameters
FileInterface$file
Folder$targetFolder
FolderInterface$originalFolder

Definition at line 2550 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\moveFile().

◆ emitPostFileRenameSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFileRenameSignal ( FileInterface  $file,
  $sanitizedTargetFileName 
)
protected

Emits the file post-rename signal.

Parameters
FileInterface$file
string$sanitizedTargetFileName

Definition at line 2572 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\renameFile().

◆ emitPostFileReplaceSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFileReplaceSignal ( FileInterface  $file,
  $localFilePath 
)
protected

Emits the file post-replace signal

Parameters
FileInterface$file
string$localFilePath

Definition at line 2594 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\replaceFile().

◆ emitPostFileSetContentsSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFileSetContentsSignal ( FileInterface  $file,
  $content 
)
protected

Emits the file post-set-contents signal

Parameters
FileInterface$file
mixed$content

Definition at line 2658 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\setFileContents().

◆ emitPostFolderAddSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFolderAddSignal ( Folder  $folder)
protected

Emits the folder post-add signal.

Parameters
Folder$folder

Definition at line 2679 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\createFolder().

◆ emitPostFolderCopySignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFolderCopySignal ( Folder  $folder,
Folder  $targetFolder,
  $newName 
)
protected

Emits the folder post-copy signal.

Parameters
Folder$folder
Folder$targetFolder
$newName

Definition at line 2703 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\copyFolder().

◆ emitPostFolderDeleteSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFolderDeleteSignal ( Folder  $folder)
protected

Emits folder post-deletion signal..

Parameters
Folder$folder

Definition at line 2770 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\deleteFolder().

◆ emitPostFolderMoveSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFolderMoveSignal ( Folder  $folder,
Folder  $targetFolder,
  $newName,
Folder  $originalFolder 
)
protected

Emits the folder post-move signal.

Parameters
Folder$folder
Folder$targetFolder
string$newName
Folder$originalFolder

Definition at line 2728 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\moveFolder().

◆ emitPostFolderRenameSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPostFolderRenameSignal ( Folder  $folder,
  $newName 
)
protected

Emits the folder post-rename signal.

Parameters
Folder$folder
string$newName

Definition at line 2750 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\renameFolder().

◆ emitPreFileAddSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFileAddSignal (   $targetFileName,
Folder  $targetFolder,
  $sourceFilePath 
)
protected

Emits file pre-add signal.

Parameters
string$targetFileName
Folder$targetFolder
string$sourceFilePath
Returns
string Modified target file name

Definition at line 2492 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addFile().

◆ emitPreFileCopySignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFileCopySignal ( FileInterface  $file,
Folder  $targetFolder 
)
protected

Emits file pre-copy signal.

Parameters
FileInterface$file
Folder$targetFolder

Definition at line 2515 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

◆ emitPreFileCreateSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFileCreateSignal ( string  $fileName,
Folder  $targetFolder 
)
protected

Emits the file pre-create signal

Parameters
string$fileName
Folder$targetFolder

Definition at line 2605 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\createFile().

◆ emitPreFileDeleteSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFileDeleteSignal ( FileInterface  $file)
protected

Emits the file pre-deletion signal.

Parameters
FileInterface$file

Definition at line 2626 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\deleteFile().

◆ emitPreFileMoveSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFileMoveSignal ( FileInterface  $file,
Folder  $targetFolder,
string  $targetFileName 
)
protected

Emits the file pre-move signal.

Parameters
FileInterface$file
Folder$targetFolder
string$targetFileName

Definition at line 2538 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\moveFile().

◆ emitPreFileRenameSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFileRenameSignal ( FileInterface  $file,
  $targetFolder 
)
protected

Emits the file pre-rename signal

Parameters
FileInterface$file
$targetFolder

Definition at line 2561 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\renameFile().

◆ emitPreFileReplaceSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFileReplaceSignal ( FileInterface  $file,
  $localFilePath 
)
protected

Emits the file pre-replace signal.

Parameters
FileInterface$file
$localFilePath

Definition at line 2583 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\replaceFile().

◆ emitPreFileSetContentsSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFileSetContentsSignal ( FileInterface  $file,
  $content 
)
protected

Emits the file pre-set-contents signal

Parameters
FileInterface$file
mixed$content

Definition at line 2647 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\setFileContents().

◆ emitPreFolderAddSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFolderAddSignal ( Folder  $targetFolder,
  $name 
)
protected

Emits the folder pre-add signal.

Parameters
Folder$targetFolder
string$name

Definition at line 2669 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\createFolder().

◆ emitPreFolderCopySignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFolderCopySignal ( Folder  $folder,
Folder  $targetFolder,
  $newName 
)
protected

Emits the folder pre-copy signal.

Parameters
Folder$folder
Folder$targetFolder
$newName

Definition at line 2691 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\copyFolder().

◆ emitPreFolderDeleteSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFolderDeleteSignal ( Folder  $folder)
protected

Emits the folder pre-deletion signal.

Parameters
Folder$folder

Definition at line 2760 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\deleteFolder().

◆ emitPreFolderMoveSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFolderMoveSignal ( Folder  $folder,
Folder  $targetFolder,
  $newName 
)
protected

Emits the folder pre-move signal.

Parameters
Folder$folder
Folder$targetFolder
$newName

Definition at line 2715 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\moveFolder().

◆ emitPreFolderRenameSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreFolderRenameSignal ( Folder  $folder,
  $newName 
)
protected

Emits the folder pre-rename signal.

Parameters
Folder$folder
string$newName

Definition at line 2739 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\renameFolder().

◆ emitPreGeneratePublicUrlSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitPreGeneratePublicUrlSignal ( ResourceInterface  $resourceObject,
  $relativeToCurrentScript,
array  $urlData 
)
protected

Emits file pre-processing signal when generating a public url for a file or folder.

Parameters
ResourceInterface$resourceObject
bool$relativeToCurrentScript
array$urlData

Definition at line 2782 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getPublicUrl().

◆ emitSanitizeFileNameSignal()

TYPO3\CMS\Core\Resource\ResourceStorage::emitSanitizeFileNameSignal (   $fileName,
Folder  $targetFolder 
)
protected

Emits sanitize fileName signal.

Parameters
string$fileName
Folder$targetFolder
Returns
string Modified target file name

Definition at line 2478 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\sanitizeFileName().

◆ getBackendUser()

TYPO3\CMS\Core\Resource\ResourceStorage::getBackendUser ( )
protected

Returns the current BE user.

Returns

Definition at line 3105 of file ResourceStorage.php.

References $GLOBALS.

◆ getCapabilities()

TYPO3\CMS\Core\Resource\ResourceStorage::getCapabilities ( )

Returns the capabilities of this storage.

Returns
int
See also
CAPABILITY_* constants

Definition at line 294 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$capabilities.

◆ getConfiguration()

TYPO3\CMS\Core\Resource\ResourceStorage::getConfiguration ( )

Gets the configuration.

Returns
array

Definition at line 208 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$configuration.

Referenced by TYPO3\CMS\Impexp\Import\isEquivalentObjectStorage().

◆ getDefaultFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getDefaultFolder ( )

◆ getDriver()

TYPO3\CMS\Core\Resource\ResourceStorage::getDriver ( )
protected

Returns the driver object belonging to this storage.

Returns
Driver

Definition at line 250 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$driver.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\createFolder().

◆ getDriverType()

TYPO3\CMS\Core\Resource\ResourceStorage::getDriverType ( )

Gets the driver Type configured for this storage.

Returns
string

Definition at line 3061 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Impexp\Import\isEquivalentObjectStorage().

◆ getEvaluatePermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::getEvaluatePermissions ( )

Gets whether the permissions to access or write into this storage should be checked or not.

Returns
bool $evaluatePermissions

Definition at line 554 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$evaluatePermissions.

◆ getFile()

TYPO3\CMS\Core\Resource\ResourceStorage::getFile (   $identifier)

Gets a file by identifier.

Parameters
string$identifier
Returns
FileInterface

Definition at line 1389 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getFileFactory(), and TYPO3\CMS\Core\Resource\ResourceStorage\getUid().

◆ getFileAndFolderNameFilters()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileAndFolderNameFilters ( )

Returns the file and folder name filters used by this storage.

Returns
array

Definition at line 1444 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$fileAndFolderNameFilters.

◆ getFileContents()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileContents (   $file)

Get contents of a file object

Parameters
FileInterface$file
Exceptions
Exception

Definition at line 1656 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFileReadPermission().

◆ getFileFactory()

◆ getFileForLocalProcessing()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileForLocalProcessing ( FileInterface  $fileObject,
  $writable = true 
)

Copies a file from the storage for local processing.

Parameters
FileInterface$fileObject
bool$writable
Returns
string Path to local file (either original or copied to some temporary local location)

Definition at line 1377 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceInterface\getIdentifier().

◆ getFileIdentifiersInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileIdentifiersInFolder (   $folderIdentifier,
  $useFilters = true,
  $recursive = false 
)
Parameters
string$folderIdentifier
bool$useFilters
bool$recursive
Returns
array

Definition at line 1539 of file ResourceStorage.php.

◆ getFileIndexRepository()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileIndexRepository ( )
protected

◆ getFileInfo()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileInfo ( FileInterface  $fileObject)

Gets information about a file.

Parameters
FileInterface$fileObject
Returns
array

Definition at line 1405 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getFileInfoByIdentifier(), and TYPO3\CMS\Core\Resource\ResourceInterface\getIdentifier().

◆ getFileInfoByIdentifier()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileInfoByIdentifier (   $identifier,
array  $propertiesToExtract = [] 
)

Gets information about a file by its identifier.

Parameters
string$identifier
array$propertiesToExtract
Returns
array

Definition at line 1418 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getFileInfo().

◆ getFileInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileInFolder (   $fileName,
Folder  $folder 
)

◆ getFileMounts()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileMounts ( )

◆ getFileProcessingService()

TYPO3\CMS\Core\Resource\ResourceStorage::getFileProcessingService ( )
protected

◆ getFilesInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getFilesInFolder ( Folder  $folder,
  $start = 0,
  $maxNumberOfItems = 0,
  $useFilters = true,
  $recursive = false,
  $sort = '',
  $sortRev = false 
)
Parameters
Folder$folder
int$start
int$maxNumberOfItems
bool$useFilters
bool$recursive
string$sortProperty name used to sort the items. Among them may be: '' (empty, no sorting), name, fileext, size, tstamp and rw. If a driver does not support the given property, it should fall back to "name".
bool$sortRevTRUE to indicate reverse sorting (last to first)
Returns
File[]
Exceptions
Exception

Definition at line 1505 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFolderReadPermission(), TYPO3\CMS\Core\Resource\ResourceStorage\getFileFactory(), TYPO3\CMS\Core\Resource\ResourceStorage\getFileIndexRepository(), TYPO3\CMS\Core\Resource\Folder\getIdentifier(), and TYPO3\CMS\Core\Resource\ResourceStorage\getUid().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\deleteFolder().

◆ getFolder()

◆ getFolderIdentifierFromFileIdentifier()

TYPO3\CMS\Core\Resource\ResourceStorage::getFolderIdentifierFromFileIdentifier (   $fileIdentifier)
Parameters
string$fileIdentifier
Returns
string

Definition at line 1472 of file ResourceStorage.php.

◆ getFolderIdentifiersInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getFolderIdentifiersInFolder (   $folderIdentifier,
  $useFilters = true,
  $recursive = false 
)
Parameters
string$folderIdentifier
bool$useFilters
bool$recursive
Returns
array

Definition at line 1565 of file ResourceStorage.php.

◆ getFolderInfo()

TYPO3\CMS\Core\Resource\ResourceStorage::getFolderInfo ( Folder  $folder)

Retrieves information about a folder

Parameters
Folder$folder
Returns
array

Definition at line 2365 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\Folder\getIdentifier().

◆ getFolderInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getFolderInFolder (   $folderName,
Folder  $parentFolder,
  $returnInaccessibleFolderObject = false 
)

Returns the Identifier for a folder within a given folder.

Parameters
string$folderNameThe name of the target folder
Folder$parentFolder
bool$returnInaccessibleFolderObject
Returns
Folder|InaccessibleFolder
Exceptions

Definition at line 2243 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getFolder(), and TYPO3\CMS\Core\Resource\Folder\getIdentifier().

◆ getFoldersInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getFoldersInFolder ( Folder  $folder,
  $start = 0,
  $maxNumberOfItems = 0,
  $useFilters = true,
  $recursive = false,
  $sort = '',
  $sortRev = false 
)
Parameters
Folder$folder
int$start
int$maxNumberOfItems
bool$useFilters
bool$recursive
string$sortProperty name used to sort the items. Among them may be: '' (empty, no sorting), name, fileext, size, tstamp and rw. If a driver does not support the given property, it should fall back to "name".
bool$sortRevTRUE to indicate reverse sorting (last to first)
Returns
Folder[]

Definition at line 2263 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$processingFolder, TYPO3\CMS\Core\Resource\ResourceStorage\getFolder(), and TYPO3\CMS\Core\Resource\Folder\getIdentifier().

◆ getIndexer()

◆ getName()

TYPO3\CMS\Core\Resource\ResourceStorage::getName ( )

Returns the name of this storage.

Returns
string

Definition at line 260 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\__construct(), and TYPO3\CMS\Backend\Tree\View\FolderTreeView\getBrowsableTree().

◆ getNamesForNestedProcessingFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getNamesForNestedProcessingFolder (   $fileIdentifier,
  $levels 
)
protected

Generates appropriate hashed sub-folder path for a given file identifier

Parameters
string$fileIdentifier
int$levels
Returns
string[]

Definition at line 3043 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getNestedProcessingFolder().

◆ getNearestRecyclerFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getNearestRecyclerFolder ( FileInterface  $file)
protected

Get the nearest Recycler folder for given file

Return null if:

  • There is no folder with ROLE_RECYCLER in the rootline of the given File
  • File is a ProcessedFile (we don't know the concept of recycler folders for processedFiles)
  • File is located in a folder with ROLE_RECYCLER
Parameters
FileInterface$file
Returns
Folder|null

Definition at line 3121 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\Folder\getIdentifier(), TYPO3\CMS\Core\Resource\ResourceInterface\getParentFolder(), TYPO3\CMS\Core\Resource\Folder\getParentFolder(), TYPO3\CMS\Core\Resource\Folder\getRole(), TYPO3\CMS\Core\Resource\Folder\getSubfolders(), TYPO3\CMS\Core\Resource\ResourceStorage\isBrowsable(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\Resource\FolderInterface\ROLE_RECYCLER.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\deleteFile().

◆ getNestedProcessingFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getNestedProcessingFolder ( File  $file,
Folder  $rootProcessingFolder 
)
protected

Getter function to return the the file's corresponding hashed subfolder of the processed folder

Parameters
File$file
Folder$rootProcessingFolder
Returns
Folder
Exceptions
Exception

Definition at line 3011 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$processingFolder, TYPO3\CMS\Core\Resource\AbstractFile\getIdentifier(), and TYPO3\CMS\Core\Resource\ResourceStorage\getNamesForNestedProcessingFolder().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getProcessingFolder().

◆ getObjectManager()

TYPO3\CMS\Core\Resource\ResourceStorage::getObjectManager ( )
protected

Gets the ObjectManager.

Returns
ObjectManager

Definition at line 2858 of file ResourceStorage.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getSignalSlotDispatcher().

◆ getProcessingFolder()

◆ getPublicUrl()

TYPO3\CMS\Core\Resource\ResourceStorage::getPublicUrl ( ResourceInterface  $resourceObject,
  $relativeToCurrentScript = false 
)

Returns a publicly accessible URL for a file.

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

Parameters
ResourceInterface$resourceObjectThe file or folder object
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|null NULL if file is missing or deleted, the generated url otherwise

Definition at line 1301 of file ResourceStorage.php.

References TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreGeneratePublicUrlSignal(), TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath(), TYPO3\CMS\Core\Resource\ResourceInterface\getIdentifier(), TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\OnlineMediaHelperRegistry\getInstance(), TYPO3\CMS\Core\Utility\PathUtility\getRelativePathTo(), TYPO3\CMS\Core\Resource\ResourceStorage\hasCapability(), TYPO3\CMS\Core\Utility\GeneralUtility\hmac(), TYPO3\CMS\Core\Resource\ResourceStorage\isOnline(), TYPO3\CMS\Core\Utility\GeneralUtility\isValidUrl(), and TYPO3\CMS\Core\Utility\GeneralUtility\locationHeaderUrl().

◆ getResourceFactoryInstance()

◆ getRole()

◆ getRootLevelFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::getRootLevelFolder (   $respectFileMounts = true)

Returns the folders on the root level of the storage or the first mount point of this storage for this user if $respectFileMounts is set.

Parameters
bool$respectFileMounts
Returns
Folder

Definition at line 2462 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getResourceFactoryInstance().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\createFolder(), TYPO3\CMS\Backend\Tree\View\FolderTreeView\getBrowsableTree(), TYPO3\CMS\Core\Resource\ResourceStorage\getFileMounts(), and TYPO3\CMS\Core\Resource\ResourceStorage\getProcessingFolder().

◆ getSignalSlotDispatcher()

TYPO3\CMS\Core\Resource\ResourceStorage::getSignalSlotDispatcher ( )
protected

Get the SignalSlot dispatcher.

Returns
Dispatcher

Definition at line 2845 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$signalSlotDispatcher, and TYPO3\CMS\Core\Resource\ResourceStorage\getObjectManager().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileAddSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileCopySignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileCreateSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileDeleteSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileMoveSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileRenameSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileReplaceSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFileSetContentsSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFolderAddSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFolderCopySignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFolderDeleteSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFolderMoveSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPostFolderRenameSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileAddSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileCopySignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileCreateSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileDeleteSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileMoveSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileRenameSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileReplaceSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFileSetContentsSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFolderAddSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFolderCopySignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFolderDeleteSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFolderMoveSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreFolderRenameSignal(), TYPO3\CMS\Core\Resource\ResourceStorage\emitPreGeneratePublicUrlSignal(), and TYPO3\CMS\Core\Resource\ResourceStorage\emitSanitizeFileNameSignal().

◆ getStorageRecord()

TYPO3\CMS\Core\Resource\ResourceStorage::getStorageRecord ( )

Gets the storage record.

Returns
array

Definition at line 228 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$storageRecord.

◆ getUid()

TYPO3\CMS\Core\Resource\ResourceStorage::getUid ( )

Returns the UID of this storage.

Returns
int

Definition at line 270 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\__construct(), TYPO3\CMS\Core\Resource\ResourceStorage\addFile(), TYPO3\CMS\Core\Resource\Security\StoragePermissionsAspect\addFileMountsToStorage(), TYPO3\CMS\Core\Resource\Security\StoragePermissionsAspect\addUserPermissionsToStorage(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFileAddPermissions(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFileCopyPermissions(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFileMovePermissions(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFolderCopyPermissions(), TYPO3\CMS\Core\Resource\ResourceStorage\assureFolderMovePermissions(), TYPO3\CMS\Core\Resource\ResourceStorage\copyFile(), TYPO3\CMS\Core\Resource\ResourceStorage\createFile(), TYPO3\CMS\Core\Resource\ProcessedFileRepository\findByStorageAndIdentifier(), TYPO3\CMS\Core\Resource\Index\FileIndexRepository\findInStorageAndNotInUidList(), TYPO3\CMS\Core\Resource\Index\FileIndexRepository\findInStorageWithIndexOutstanding(), TYPO3\CMS\Core\Resource\ResourceStorage\getFile(), TYPO3\CMS\Core\Resource\ResourceStorage\getFileInFolder(), TYPO3\CMS\Core\Resource\ResourceStorage\getFilesInFolder(), TYPO3\CMS\Core\Resource\ResourceStorage\getProcessingFolder(), TYPO3\CMS\Backend\Tree\View\FolderTreeView\getShortHashNumberForStorage(), TYPO3\CMS\Core\Resource\ResourceStorage\hasFile(), TYPO3\CMS\Core\Resource\ResourceStorage\isOnline(), TYPO3\CMS\Core\Resource\ResourceStorage\markAsPermanentlyOffline(), TYPO3\CMS\Core\Resource\ResourceStorage\markAsTemporaryOffline(), TYPO3\CMS\Core\Resource\ResourceStorage\moveFile(), TYPO3\CMS\Core\Resource\ResourceStorage\moveFolder(), and TYPO3\CMS\Core\Resource\AbstractFile\setStorage().

◆ getUniqueName()

TYPO3\CMS\Core\Resource\ResourceStorage::getUniqueName ( FolderInterface  $folder,
  $theFile,
  $dontCheckForUnique = false 
)
protected

Returns the destination path/fileName of a unique fileName/foldername in that path. If $theFile exists in $theDest (directory) the file have numbers appended up to $this->maxNumber. Hereafter a unique string will be appended. This function is used by fx. DataHandler when files are attached to records and needs to be uniquely named in the uploads/* folders

Parameters
FolderInterface$folder
string$theFileThe input fileName to check
bool$dontCheckForUniqueIf set the fileName is returned with the path prepended without checking whether it already existed!
Exceptions

Definition at line 2800 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceInterface\getIdentifier(), and TYPO3\CMS\Core\Utility\PathUtility\pathinfo().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addFile(), TYPO3\CMS\Core\Resource\ResourceStorage\copyFile(), TYPO3\CMS\Core\Resource\ResourceStorage\moveFile(), and TYPO3\CMS\Core\Resource\ResourceStorage\renameFile().

◆ hasCapability()

TYPO3\CMS\Core\Resource\ResourceStorage::hasCapability (   $capability)
protected

Returns TRUE if this storage has the given capability.

Parameters
int$capabilityA capability, as defined in a CAPABILITY_* constant
Returns
bool

Definition at line 305 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getPublicUrl(), TYPO3\CMS\Core\Resource\ResourceStorage\isBrowsable(), TYPO3\CMS\Core\Resource\ResourceStorage\isPublic(), and TYPO3\CMS\Core\Resource\ResourceStorage\isWritable().

◆ hasChildren()

TYPO3\CMS\Core\Resource\ResourceStorage::hasChildren ( )

Tells whether there are children in this storage.

Returns
bool

Definition at line 280 of file ResourceStorage.php.

◆ hasFile()

◆ hasFileInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::hasFileInFolder (   $fileName,
Folder  $folder 
)

Checks if the queried file in the given folder exists

Parameters
string$fileName
Folder$folder
Returns
bool

Definition at line 1642 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFolderReadPermission(), and TYPO3\CMS\Core\Resource\Folder\getIdentifier().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addUploadedFile().

◆ hasFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::hasFolder (   $identifier)

Returns TRUE if the specified folder exists.

Parameters
string$identifier
Returns
bool

Definition at line 2303 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFolderReadPermission().

◆ hasFolderInFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::hasFolderInFolder (   $folderName,
Folder  $folder 
)

Checks if the given file exists in the given folder

Parameters
string$folderName
Folder$folder
Returns
bool

Definition at line 2316 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\assureFolderReadPermission(), and TYPO3\CMS\Core\Resource\Folder\getIdentifier().

◆ hashFile()

TYPO3\CMS\Core\Resource\ResourceStorage::hashFile ( FileInterface  $fileObject,
  $hash 
)

Creates a (cryptographic) hash for a file.

Parameters
FileInterface$fileObject
string$hash
Returns
string

Definition at line 1256 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceInterface\getIdentifier(), and TYPO3\CMS\Core\Resource\ResourceStorage\hashFileByIdentifier().

◆ hashFileByIdentifier()

TYPO3\CMS\Core\Resource\ResourceStorage::hashFileByIdentifier (   $fileIdentifier,
  $hash 
)

Creates a (cryptographic) hash for a fileIdentifier.

Parameters
string$fileIdentifier
string$hash
Returns
string

Definition at line 1269 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\hashFile().

◆ isBrowsable()

◆ isDefault()

TYPO3\CMS\Core\Resource\ResourceStorage::isDefault ( )

◆ isOnline()

◆ isProcessingFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::isProcessingFolder ( Folder  $folder)

Returns TRUE if folder that is in current storage is set as processing folder for one of the existing storages

Parameters
Folder$folder
Returns
bool

Definition at line 1623 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$processingFolder, and TYPO3\CMS\Core\Resource\Folder\getCombinedIdentifier().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getRole().

◆ isPublic()

TYPO3\CMS\Core\Resource\ResourceStorage::isPublic ( )

Returns TRUE if this storage is publicly available. This is just a configuration option and does not mean that it really is public. OTOH a storage that is marked as not publicly available will trigger the file publishing mechanisms of TYPO3.

Returns
bool

Definition at line 318 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\hasCapability().

◆ isWithinFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::isWithinFolder ( Folder  $folder,
ResourceInterface  $resource 
)

◆ isWithinProcessingFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::isWithinProcessingFolder (   $identifier)

Returns TRUE if the specified file is in a folder that is set a processing for a storage

Parameters
string$identifier
Returns
bool

Definition at line 2423 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$processingFolder.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\getFileMounts(), and TYPO3\CMS\Core\Resource\ResourceStorage\hasFile().

◆ isWritable()

TYPO3\CMS\Core\Resource\ResourceStorage::isWritable ( )

Returns TRUE if this storage is writable. This is determined by the driver and the storage configuration; user permissions are not taken into account.

Returns
bool

Definition at line 329 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\hasCapability().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\checkFileActionPermission(), TYPO3\CMS\Core\Resource\ResourceStorage\checkFolderActionPermission(), and TYPO3\CMS\Impexp\Import\isEquivalentObjectStorage().

◆ markAsPermanentlyOffline()

TYPO3\CMS\Core\Resource\ResourceStorage::markAsPermanentlyOffline ( )

Blows the "fuse" and marks the storage as offline.

Can only be modified by an admin.

Typically, this is only done if the configuration is wrong.

Definition at line 405 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getUid(), TYPO3\CMS\Core\Resource\ResourceStorage\isOnline(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ markAsTemporaryOffline()

TYPO3\CMS\Core\Resource\ResourceStorage::markAsTemporaryOffline ( )

Marks this storage as offline for the next 5 minutes.

Non-permanent: This typically happens for remote storages that are "flaky" and not available all the time.

Definition at line 427 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getUid(), TYPO3\CMS\Core\Resource\ResourceStorage\isOnline(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ moveFile()

TYPO3\CMS\Core\Resource\ResourceStorage::moveFile (   $file,
  $targetFolder,
  $targetFileName = null,
  $conflictMode = DuplicationBehavior::RENAME 
)

◆ moveFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::moveFolder ( Folder  $folderToMove,
Folder  $targetParentFolder,
  $newFolderName = null,
  $conflictMode = DuplicationBehavior::RENAME 
)

◆ moveFolderBetweenStorages()

TYPO3\CMS\Core\Resource\ResourceStorage::moveFolderBetweenStorages ( Folder  $folderToMove,
Folder  $targetParentFolder,
  $newFolderName 
)
protected

Moves the given folder from a different storage to the target folder in this storage.

Parameters
Folder$folderToMove
Folder$targetParentFolder
string$newFolderName
Returns
bool
Exceptions
NotImplementedMethodException

Definition at line 2097 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\moveFolder().

◆ processFile()

TYPO3\CMS\Core\Resource\ResourceStorage::processFile ( FileInterface  $fileObject,
  $context,
array  $configuration 
)

Passes a file to the File Processing Services and returns the resulting ProcessedFile object.

Parameters
FileInterface$fileObjectThe file object
string$context
array$configuration
Returns
ProcessedFile
Exceptions

Definition at line 1360 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getFileProcessingService(), and TYPO3\CMS\Core\Resource\ResourceInterface\getStorage().

◆ renameFile()

◆ renameFolder()

TYPO3\CMS\Core\Resource\ResourceStorage::renameFolder (   $folderObject,
  $newName 
)

◆ replaceFile()

◆ resetFileAndFolderNameFiltersToDefault()

TYPO3\CMS\Core\Resource\ResourceStorage::resetFileAndFolderNameFiltersToDefault ( )

Resets the file and folder name filters to the default values defined in the TYPO3 configuration.

Definition at line 1434 of file ResourceStorage.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\__construct().

◆ sanitizeFileName()

TYPO3\CMS\Core\Resource\ResourceStorage::sanitizeFileName (   $fileName,
Folder  $targetFolder = null 
)

Clean a fileName from not allowed characters

Parameters
string$fileNameThe name of the file to be add, If not set, the local file name is used
Folder$targetFolderThe target folder where the file should be added
Exceptions

Definition at line 1158 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\emitSanitizeFileNameSignal(), and TYPO3\CMS\Core\Resource\ResourceStorage\getDefaultFolder().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\addFile().

◆ setConfiguration()

TYPO3\CMS\Core\Resource\ResourceStorage::setConfiguration ( array  $configuration)

Sets the configuration.

Parameters
array$configuration

Definition at line 218 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$configuration.

◆ setDefault()

TYPO3\CMS\Core\Resource\ResourceStorage::setDefault (   $isDefault)

◆ setDriver()

TYPO3\CMS\Core\Resource\ResourceStorage::setDriver ( Driver\DriverInterface  $driver)

Sets the storage that belongs to this storage.

Parameters
Driver\DriverInterface$driver
Returns
ResourceStorage

Definition at line 239 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$driver.

◆ setEvaluatePermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::setEvaluatePermissions (   $evaluatePermissions)

Sets whether the permissions to access or write into this storage should be checked or not.

Parameters
bool$evaluatePermissions

Definition at line 543 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$evaluatePermissions.

Referenced by TYPO3\CMS\Core\Resource\Security\StoragePermissionsAspect\addUserPermissionsToStorage().

◆ setFileAndFolderNameFilters()

TYPO3\CMS\Core\Resource\ResourceStorage::setFileAndFolderNameFilters ( array  $filters)
Parameters
array$filters
Returns
$this

Definition at line 1453 of file ResourceStorage.php.

◆ setFileContents()

◆ setUserPermissions()

TYPO3\CMS\Core\Resource\ResourceStorage::setUserPermissions ( array  $userPermissions)

Sets the user permissions of the storage.

Parameters
array$userPermissions

Definition at line 564 of file ResourceStorage.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\$userPermissions.

Referenced by TYPO3\CMS\Core\Resource\Security\StoragePermissionsAspect\addUserPermissionsToStorage().

◆ unsetFileAndFolderNameFilters()

TYPO3\CMS\Core\Resource\ResourceStorage::unsetFileAndFolderNameFilters ( )

Unsets the file and folder name filters, thus making this storage return unfiltered filelists.

Definition at line 1426 of file ResourceStorage.php.

◆ updateProcessedFile()

TYPO3\CMS\Core\Resource\ResourceStorage::updateProcessedFile (   $localFilePath,
ProcessedFile  $processedFile,
Folder  $processingFolder = null 
)

◆ usesCaseSensitiveIdentifiers()

TYPO3\CMS\Core\Resource\ResourceStorage::usesCaseSensitiveIdentifiers ( )

Returns TRUE if the identifiers used by this storage are case-sensitive.

Returns
bool

Definition at line 349 of file ResourceStorage.php.

Member Data Documentation

◆ $capabilities

TYPO3\CMS\Core\Resource\ResourceStorage::$capabilities
protected

◆ $configuration

TYPO3\CMS\Core\Resource\ResourceStorage::$configuration
protected

◆ $driver

◆ $evaluatePermissions

◆ $fileAndFolderNameFilters

TYPO3\CMS\Core\Resource\ResourceStorage::$fileAndFolderNameFilters = []
protected

◆ $fileMounts

TYPO3\CMS\Core\Resource\ResourceStorage::$fileMounts = []
protected

◆ $fileProcessingService

TYPO3\CMS\Core\Resource\ResourceStorage::$fileProcessingService
protected

◆ $isDefault

TYPO3\CMS\Core\Resource\ResourceStorage::$isDefault = false
protected

◆ $isOnline

TYPO3\CMS\Core\Resource\ResourceStorage::$isOnline = null
protected

◆ $processingFolder

◆ $processingFolders

TYPO3\CMS\Core\Resource\ResourceStorage::$processingFolders
protected

◆ $signalSlotDispatcher

TYPO3\CMS\Core\Resource\ResourceStorage::$signalSlotDispatcher
protected

◆ $storageRecord

TYPO3\CMS\Core\Resource\ResourceStorage::$storageRecord
protected

◆ $userPermissions

TYPO3\CMS\Core\Resource\ResourceStorage::$userPermissions = []
protected

◆ PROCESSING_FOLDER_LEVELS

const TYPO3\CMS\Core\Resource\ResourceStorage::PROCESSING_FOLDER_LEVELS = 2

Levels numbers used to generate hashed subfolders in the processing folder

Definition at line 161 of file ResourceStorage.php.

Referenced by TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\getNestedProcessingFolderTest().