new file identifiers */ public function moveFolderWithinStorage($sourceFolderIdentifier, $targetFolderIdentifier, $newFolderName); /** * Folder equivalent to copyFileWithinStorage(). * * @param string $sourceFolderIdentifier * @param string $targetFolderIdentifier * @param string $newFolderName * * @return bool */ public function copyFolderWithinStorage($sourceFolderIdentifier, $targetFolderIdentifier, $newFolderName); /** * 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. * * @param string $fileIdentifier * @return string The file contents */ public function getFileContents($fileIdentifier); /** * Sets the contents of a file to the specified value. * * @param string $fileIdentifier * @param string $contents * @return int The number of bytes written to the file */ public function setFileContents($fileIdentifier, $contents); /** * Checks if a file inside a folder exists * * @param string $fileName * @param string $folderIdentifier * @return bool */ public function fileExistsInFolder($fileName, $folderIdentifier); /** * Checks if a folder inside a folder exists. * * @param string $folderName * @param string $folderIdentifier * @return bool */ public function folderExistsInFolder($folderName, $folderIdentifier); /** * 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! * * @param string $fileIdentifier * @param 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! * @return string The path to the file on the local disk */ public function getFileForLocalProcessing($fileIdentifier, $writable = TRUE); /** * Returns the permissions of a file/folder as an array * (keys r, w) of boolean flags * * @param string $identifier * @return array */ public function getPermissions($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. * * @param string $identifier * @return void */ public function dumpFileContents($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. * * @param string $folderIdentifier * @param string $identifier identifier to be checked against $folderIdentifier * @return bool TRUE if $content is within or matches $folderIdentifier */ public function isWithin($folderIdentifier, $identifier); /** * Returns information about a file. * * @param string $fileIdentifier * @param array $propertiesToExtract Array of properties which are be extracted * If empty all will be extracted * @return array */ public function getFileInfoByIdentifier($fileIdentifier, array $propertiesToExtract = array()); /** * Returns information about a file. * * @param string $folderIdentifier * @return array */ public function getFolderInfoByIdentifier($folderIdentifier); /** * Returns a list of files inside the specified path * * @param string $folderIdentifier * @param int $start * @param int $numberOfItems * @param bool $recursive * @param array $filenameFilterCallbacks callbacks for filtering the items * * @return array of FileIdentifiers */ public function getFilesInFolder($folderIdentifier, $start = 0, $numberOfItems = 0, $recursive = FALSE, array $filenameFilterCallbacks = array()); /** * Returns a list of folders inside the specified path * * @param string $folderIdentifier * @param int $start * @param int $numberOfItems * @param bool $recursive * @param array $folderNameFilterCallbacks callbacks for filtering the items * * @return array of Folder Identifier */ public function getFoldersInFolder($folderIdentifier, $start = 0, $numberOfItems = 0, $recursive = FALSE, array $folderNameFilterCallbacks = array()); }