TYPO3
7.6
|
Public Member Functions | |
processConfiguration () | |
setStorageUid ($storageUid) | |
initialize () | |
getCapabilities () | |
mergeConfigurationCapabilities ($capabilities) | |
hasCapability ($capability) | |
isCaseSensitiveFileSystem () | |
sanitizeFileName ($fileName, $charset= '') | |
hashIdentifier ($identifier) | |
getRootLevelFolder () | |
getDefaultFolder () | |
getParentFolderIdentifierOfIdentifier ($fileIdentifier) | |
getPublicUrl ($identifier) | |
createFolder ($newFolderName, $parentFolderIdentifier= '', $recursive=false) | |
renameFolder ($folderIdentifier, $newName) | |
deleteFolder ($folderIdentifier, $deleteRecursively=false) | |
fileExists ($fileIdentifier) | |
folderExists ($folderIdentifier) | |
isFolderEmpty ($folderIdentifier) | |
addFile ($localFilePath, $targetFolderIdentifier, $newFileName= '', $removeOriginal=true) | |
createFile ($fileName, $parentFolderIdentifier) | |
copyFileWithinStorage ($fileIdentifier, $targetFolderIdentifier, $fileName) | |
renameFile ($fileIdentifier, $newName) | |
replaceFile ($fileIdentifier, $localFilePath) | |
deleteFile ($fileIdentifier) | |
hash ($fileIdentifier, $hashAlgorithm) | |
moveFileWithinStorage ($fileIdentifier, $targetFolderIdentifier, $newFileName) | |
moveFolderWithinStorage ($sourceFolderIdentifier, $targetFolderIdentifier, $newFolderName) | |
copyFolderWithinStorage ($sourceFolderIdentifier, $targetFolderIdentifier, $newFolderName) | |
getFileContents ($fileIdentifier) | |
setFileContents ($fileIdentifier, $contents) | |
fileExistsInFolder ($fileName, $folderIdentifier) | |
folderExistsInFolder ($folderName, $folderIdentifier) | |
getFileForLocalProcessing ($fileIdentifier, $writable=true) | |
getPermissions ($identifier) | |
dumpFileContents ($identifier) | |
isWithin ($folderIdentifier, $identifier) | |
getFileInfoByIdentifier ($fileIdentifier, array $propertiesToExtract=array()) | |
getFolderInfoByIdentifier ($folderIdentifier) | |
getFileInFolder ($fileName, $folderIdentifier) | |
getFilesInFolder ($folderIdentifier, $start=0, $numberOfItems=0, $recursive=false, array $filenameFilterCallbacks=array(), $sort= '', $sortRev=false) | |
getFolderInFolder ($folderName, $folderIdentifier) | |
getFoldersInFolder ($folderIdentifier, $start=0, $numberOfItems=0, $recursive=false, array $folderNameFilterCallbacks=array(), $sort= '', $sortRev=false) | |
countFilesInFolder ($folderIdentifier, $recursive=false, array $filenameFilterCallbacks=array()) | |
countFoldersInFolder ($folderIdentifier, $recursive=false, array $folderNameFilterCallbacks=array()) | |
An interface Drivers have to implement to fulfil the needs of the FAL API.
Definition at line 22 of file DriverInterface.php.
addFile | ( | $localFilePath, | |
$targetFolderIdentifier, | |||
$newFileName = '' , |
|||
$removeOriginal = true |
|||
) |
Adds a file from the local server hard disk to a given path in TYPO3s virtual file system. This assumes that the local file exists, so no further check is done here! After a successful the original file must not exist anymore.
string | $localFilePath | (within PATH_site) |
string | $targetFolderIdentifier | |
string | $newFileName | optional, if not given original name is used |
bool | $removeOriginal | if set the original file will be removed after successful operation |
Implemented in LocalDriver.
copyFileWithinStorage | ( | $fileIdentifier, | |
$targetFolderIdentifier, | |||
$fileName | |||
) |
Copies a file within the current storage. Note that this is only about an inner storage copy action, where a file is just copied to another folder in the same storage.
string | $fileIdentifier | |
string | $targetFolderIdentifier | |
string | $fileName |
Implemented in LocalDriver.
copyFolderWithinStorage | ( | $sourceFolderIdentifier, | |
$targetFolderIdentifier, | |||
$newFolderName | |||
) |
Folder equivalent to copyFileWithinStorage().
string | $sourceFolderIdentifier | |
string | $targetFolderIdentifier | |
string | $newFolderName |
countFilesInFolder | ( | $folderIdentifier, | |
$recursive = false , |
|||
array | $filenameFilterCallbacks = array() |
||
) |
Returns the number of files inside the specified path
string | $folderIdentifier | |
bool | $recursive | |
array | $filenameFilterCallbacks | callbacks for filtering the items |
Implemented in LocalDriver.
countFoldersInFolder | ( | $folderIdentifier, | |
$recursive = false , |
|||
array | $folderNameFilterCallbacks = array() |
||
) |
Returns the number of folders inside the specified path
string | $folderIdentifier | |
bool | $recursive | |
array | $folderNameFilterCallbacks | callbacks for filtering the items |
Implemented in LocalDriver.
createFile | ( | $fileName, | |
$parentFolderIdentifier | |||
) |
Creates a new (empty) file and returns the identifier.
string | $fileName | |
string | $parentFolderIdentifier |
Implemented in LocalDriver.
createFolder | ( | $newFolderName, | |
$parentFolderIdentifier = '' , |
|||
$recursive = false |
|||
) |
Creates a folder, within a parent folder. If no parent folder is given, a root level folder will be created
string | $newFolderName | |
string | $parentFolderIdentifier | |
bool | $recursive |
Implemented in LocalDriver.
deleteFile | ( | $fileIdentifier | ) |
Removes a file from the filesystem. This does not check if the file is still used or if it is a bad idea to delete it for some other reason this has to be taken care of in the upper layers (e.g. the Storage)!
string | $fileIdentifier |
Implemented in LocalDriver.
deleteFolder | ( | $folderIdentifier, | |
$deleteRecursively = false |
|||
) |
Removes a folder in filesystem.
string | $folderIdentifier | |
bool | $deleteRecursively |
Implemented in LocalDriver.
dumpFileContents | ( | $identifier | ) |
Directly output the contents of the file to the output buffer. Should not take care of header files or flushing buffer before. Will be taken care of by the Storage.
string | $identifier |
Implemented in LocalDriver.
fileExists | ( | $fileIdentifier | ) |
fileExistsInFolder | ( | $fileName, | |
$folderIdentifier | |||
) |
Checks if a file inside a folder exists
string | $fileName | |
string | $folderIdentifier |
Implemented in LocalDriver.
folderExists | ( | $folderIdentifier | ) |
Checks if a folder exists.
string | $folderIdentifier |
Implemented in LocalDriver.
folderExistsInFolder | ( | $folderName, | |
$folderIdentifier | |||
) |
Checks if a folder inside a folder exists.
string | $folderName | |
string | $folderIdentifier |
Implemented in LocalDriver.
getCapabilities | ( | ) |
Returns the capabilities of this driver.
Implemented in AbstractDriver.
getDefaultFolder | ( | ) |
Returns the identifier of the default folder new files should be put into.
Implemented in LocalDriver.
getFileContents | ( | $fileIdentifier | ) |
Returns the contents of a file. Beware that this requires to load the complete file into memory and also may require fetching the file from an external location. So this might be an expensive operation (both in terms of processing resources and money) for large files.
string | $fileIdentifier |
Implemented in LocalDriver.
getFileForLocalProcessing | ( | $fileIdentifier, | |
$writable = true |
|||
) |
Returns a path to a local copy of a file for processing it. When changing the file, you have to take care of replacing the current version yourself!
string | $fileIdentifier | |
bool | $writable | Set this to FALSE if you only need the file for read operations. This might speed up things, e.g. by using a cached local version. Never modify the file if you have set this flag! |
Implemented in LocalDriver.
getFileInfoByIdentifier | ( | $fileIdentifier, | |
array | $propertiesToExtract = array() |
||
) |
Returns information about a file.
string | $fileIdentifier | |
array | $propertiesToExtract | Array of properties which are be extracted If empty all will be extracted |
Implemented in LocalDriver.
getFileInFolder | ( | $fileName, | |
$folderIdentifier | |||
) |
Returns the identifier of a file inside the folder
string | $fileName | |
string | $folderIdentifier |
Implemented in LocalDriver.
getFilesInFolder | ( | $folderIdentifier, | |
$start = 0 , |
|||
$numberOfItems = 0 , |
|||
$recursive = false , |
|||
array | $filenameFilterCallbacks = array() , |
||
$sort = '' , |
|||
$sortRev = false |
|||
) |
Returns a list of files inside the specified path
string | $folderIdentifier | |
int | $start | |
int | $numberOfItems | |
bool | $recursive | |
array | $filenameFilterCallbacks | callbacks for filtering the items |
string | $sort | Property 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 | $sortRev | TRUE to indicate reverse sorting (last to first) |
Implemented in LocalDriver.
getFolderInfoByIdentifier | ( | $folderIdentifier | ) |
Returns information about a file.
string | $folderIdentifier |
Implemented in LocalDriver.
getFolderInFolder | ( | $folderName, | |
$folderIdentifier | |||
) |
Returns the identifier of a folder inside the folder
string | $folderName | The name of the target folder |
string | $folderIdentifier |
Implemented in LocalDriver.
getFoldersInFolder | ( | $folderIdentifier, | |
$start = 0 , |
|||
$numberOfItems = 0 , |
|||
$recursive = false , |
|||
array | $folderNameFilterCallbacks = array() , |
||
$sort = '' , |
|||
$sortRev = false |
|||
) |
Returns a list of folders inside the specified path
string | $folderIdentifier | |
int | $start | |
int | $numberOfItems | |
bool | $recursive | |
array | $folderNameFilterCallbacks | callbacks for filtering the items |
string | $sort | Property 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 | $sortRev | TRUE to indicate reverse sorting (last to first) |
Implemented in LocalDriver.
getParentFolderIdentifierOfIdentifier | ( | $fileIdentifier | ) |
Returns the identifier of the folder the file resides in
string | $fileIdentifier |
Implemented in AbstractHierarchicalFilesystemDriver.
getPermissions | ( | $identifier | ) |
Returns the permissions of a file/folder as an array (keys r, w) of boolean flags
string | $identifier |
Implemented in LocalDriver.
getPublicUrl | ( | $identifier | ) |
Returns the public URL to a file. Either fully qualified URL or relative to PATH_site (rawurlencoded).
string | $identifier |
Implemented in LocalDriver.
getRootLevelFolder | ( | ) |
Returns the identifier of the root level folder of the storage.
Implemented in LocalDriver.
hasCapability | ( | $capability | ) |
Returns TRUE if this driver has the given capability.
int | $capability | A capability, as defined in a CAPABILITY_* constant |
Implemented in AbstractDriver.
hash | ( | $fileIdentifier, | |
$hashAlgorithm | |||
) |
Creates a hash for a file.
string | $fileIdentifier | |
string | $hashAlgorithm | The hash algorithm to use |
Implemented in LocalDriver.
hashIdentifier | ( | $identifier | ) |
Hashes a file identifier, taking the case sensitivity of the file system into account. This helps mitigating problems with case-insensitive databases.
string | $identifier |
Implemented in AbstractDriver.
initialize | ( | ) |
Initializes this object. This is called by the storage after the driver has been attached.
Implemented in LocalDriver.
isCaseSensitiveFileSystem | ( | ) |
Returns TRUE if this driver uses case-sensitive identifiers. NOTE: This is a configurable setting, but the setting does not change the way the underlying file system treats the identifiers; the setting should therefore always reflect the file system and not try to change its behaviour
Implemented in AbstractDriver.
isFolderEmpty | ( | $folderIdentifier | ) |
Checks if a folder contains files and (if supported) other folders.
string | $folderIdentifier |
Implemented in LocalDriver.
isWithin | ( | $folderIdentifier, | |
$identifier | |||
) |
Checks if a given identifier is within a container, e.g. if a file or folder is within another folder. This can e.g. be used to check for web-mounts.
Hint: this also needs to return TRUE if the given identifier matches the container identifier to allow access to the root folder of a filemount.
string | $folderIdentifier | |
string | $identifier | identifier to be checked against $folderIdentifier |
Implemented in LocalDriver.
mergeConfigurationCapabilities | ( | $capabilities | ) |
Merges the capabilities merged by the user at the storage configuration into the actual capabilities of the driver and returns the result.
int | $capabilities |
Implemented in LocalDriver.
moveFileWithinStorage | ( | $fileIdentifier, | |
$targetFolderIdentifier, | |||
$newFileName | |||
) |
Moves a file within the current storage. Note that this is only about an inner-storage move action, where a file is just moved to another folder in the same storage.
string | $fileIdentifier | |
string | $targetFolderIdentifier | |
string | $newFileName |
Implemented in LocalDriver.
moveFolderWithinStorage | ( | $sourceFolderIdentifier, | |
$targetFolderIdentifier, | |||
$newFolderName | |||
) |
Folder equivalent to moveFileWithinStorage().
string | $sourceFolderIdentifier | |
string | $targetFolderIdentifier | |
string | $newFolderName |
Implemented in LocalDriver.
processConfiguration | ( | ) |
renameFile | ( | $fileIdentifier, | |
$newName | |||
) |
Renames a file in this storage.
string | $fileIdentifier | |
string | $newName | The target path (including the file name!) |
Implemented in LocalDriver.
renameFolder | ( | $folderIdentifier, | |
$newName | |||
) |
Renames a folder in this storage.
string | $folderIdentifier | |
string | $newName |
Implemented in LocalDriver.
replaceFile | ( | $fileIdentifier, | |
$localFilePath | |||
) |
Replaces a file with file in local file system.
string | $fileIdentifier | |
string | $localFilePath |
Implemented in LocalDriver.
sanitizeFileName | ( | $fileName, | |
$charset = '' |
|||
) |
Cleans a fileName from not allowed characters
string | $fileName | |
string | $charset | Charset of the a fileName (defaults to current charset; depending on context) |
Implemented in LocalDriver, and AbstractDriver.
setFileContents | ( | $fileIdentifier, | |
$contents | |||
) |
Sets the contents of a file to the specified value.
string | $fileIdentifier | |
string | $contents |
Implemented in LocalDriver.
setStorageUid | ( | $storageUid | ) |
Sets the storage uid the driver belongs to
int | $storageUid |
Implemented in AbstractDriver.