|
eZ Publish
[4.2]
|
Tool class which has convencience functions for files and directories. More...
Static Public Member Functions | |
| static | create ($filename, $directory=false, $data=false, $atomic=false) |
| static | download ($file, $isAttachedDownload=true, $overrideFilename=false) |
| static | getContents ($filename) |
| static | isWriteable ($filename) |
| static | rename ($srcFile, $destFile, $mkdir=false) |
| static | splitLines ($file) |
| static | suffix ($filename) |
Tool class which has convencience functions for files and directories.
Definition at line 40 of file ezfile.php.
| static eZFile::create | ( | $ | filename, |
| $ | directory = false, |
||
| $ | data = false, |
||
| $ | atomic = false |
||
| ) | [static] |
Creates a file called $filename. If $directory is specified the file is placed there, the directory will also be created if missing. if $data is specified the file will created with the content of this variable.
| $atomic | If true the file contents will be written to a temporary file and renamed to the correct file. |
Definition at line 69 of file ezfile.php.
Referenced by eZMutex\clearMeta(), eZDFSFileHandlerDFSBackend\copyFromDFS(), eZDFSFileHandlerDFSBackend\copyFromDFSToDFS(), eZDFSFileHandlerDFSBackend\copyToDFS(), eZDFSFileHandlerDFSBackend\createFileOnDFS(), eZFSFileHandler\fileStoreContents(), eZFileTransport\sendMail(), eZMutex\setMeta(), eZDBFileHandler\storeCache(), eZDFSFileHandler\storeCache(), eZDBFileHandler\storeContents(), eZDFSFileHandler\storeContents(), and eZFSFileHandler\storeContents().
| static eZFile::download | ( | $ | file, |
| $ | isAttachedDownload = true, |
||
| $ | overrideFilename = false |
||
| ) | [static] |
Prepares a file for Download and terminates the execution.
| $file | Filename |
| $isAttachedDownload | Determines weather to download the file as an attachment ( download popup box ) or not. |
Definition at line 210 of file ezfile.php.
| static eZFile::getContents | ( | $ | filename | ) | [static] |
Read all content of file.
| filename |
Definition at line 120 of file ezfile.php.
| static eZFile::isWriteable | ( | $ | filename | ) | [static] |
| static eZFile::rename | ( | $ | srcFile, |
| $ | destFile, | ||
| $ | mkdir = false |
||
| ) | [static] |
Renames a file atomically on Unix, and provides a workaround for Windows
| $srcFile | from filename |
| $destFile | to filename |
| $mkdir | make directory for dest file if needed |
Definition at line 187 of file ezfile.php.
Referenced by eZDBFileHandlerMysqlBackend\_fetch(), eZDFSFileHandlerMySQLBackend\_fetch(), eZMutex\clearMeta(), eZPHPCreator\close(), create(), eZFS2FileHandler\endCacheGeneration(), eZFileHandler\move(), eZWebDAVFileServer\move(), eZWebDAVFileServer\put(), eZSubtreeCache\renameDir(), eZDFSFileHandlerDFSBackend\renameOnDFS(), eZLog\rotateLog(), eZDebug\rotateLog(), eZINI\saveCache(), eZMutex\setMeta(), and eZStaticCache\storeCachedFile().
| static eZFile::splitLines | ( | $ | file | ) | [static] |
Reads the whole contents of the file $file and splits it into lines which is collected into an array and returned. It will handle Unix (
), Windows (
) and Mac () style newlines.
Definition at line 49 of file ezfile.php.
Referenced by eZMD5\checkMD5Sums().
| static eZFile::suffix | ( | $ | filename | ) | [static] |
Get suffix from filename
| filename |
Definition at line 148 of file ezfile.php.
Referenced by eZTSTranslator\fetchList(), eZWebDAVContentServer\fetchNodeInfo(), eZWebDAVContentBackend\fetchNodeInfo(), eZMediaType\fetchObjectAttributeHTTPInput(), eZBinaryFileType\fetchObjectAttributeHTTPInput(), eZBinaryFileType\insertRegularFile(), eZMediaType\insertRegularFile(), eZImageType\trashStoredObjectAttribute(), eZMediaType\trashStoredObjectAttribute(), eZBinaryFileType\trashStoredObjectAttribute(), eZBinaryFileType\unserializeContentObjectAttribute(), and eZMediaType\unserializeContentObjectAttribute().