eZPublish  3.9
eZDBFileHandler Class Reference

Public Member Functions

 deleteLocal ()
 Deletes a file that has been fetched before. More...
 
 exists ()
 Check if given file/dir exists. More...
 
 eZDBFileHandler ($filePath=false)
 Constructor. More...
 
 fetch ()
 Fetches file from db and saves it in FS under the same name. More...
 
 fetchContents ()
 Returns file contents. More...
 
 getFileList ($skipBinaryFiles=false, $skipImages=false)
 Get list of files stored in database. More...
 
 loadMetaData ($force=false)
 
 move ($dstPath)
 Move file. More...
 
 mtime ()
 Returns file modification time. More...
 
 name ()
 Returns file name. More...
 
 passthrough ()
 Outputs file contents prepending them with appropriate HTTP headers. More...
 
 size ()
 Returns file size. More...
 
 stat ()
 Returns file metadata. More...
 
 storeContents ($contents, $scope=false, $datatype=false)
 Store file contents. More...
 

Static Public Member Functions

 delete ()
 Deletes specified file/directory. More...
 
 fetchUnique ()
 Fetches file from db and saves it in FS under unique name. More...
 
 fileCopy ($srcPath, $dstPath)
 Copy file. More...
 
 fileDelete ($path)
 Deletes specified file/directory. More...
 
 fileDeleteByDirList ($dirList, $commonPath, $commonSuffix)
 
 fileDeleteByRegex ($dir, $fileRegex)
 
 fileDeleteByWildcard ($wildcard)
 
 fileDeleteLocal ($path)
 Deletes a file that has been fetched before. More...
 
 fileExists ($path)
 Check if given file/dir exists. More...
 
 fileFetch ($filePath)
 Fetches file from db and saves it in FS under the same name. More...
 
 fileFetchContents ($filePath)
 Returns file contents. More...
 
 fileLinkCopy ($srcPath, $dstPath, $symLink)
 Create symbolic or hard link to file. More...
 
 fileMove ($srcPath, $dstPath)
 Move file. More...
 
 fileStore ($filePath, $scope=false, $delete=false, $datatype=false)
 
 fileStoreContents ($filePath, $contents, $scope=false, $datatype=false)
 Store file contents. More...
 

Member Function Documentation

eZDBFileHandler::delete ( )
static

Deletes specified file/directory.

If a directory specified it is deleted recursively.

eZDBFileHandler::deleteLocal ( )

Deletes a file that has been fetched before.

eZDBFileHandler::exists ( )

Check if given file/dir exists.

NOTE: this function does not interact with database. Instead, it just returns existance status determined in the constructor.

eZDBFileHandler::eZDBFileHandler (   $filePath = false)

Constructor.

$filePath File path. If specified, file metadata is fetched in the constructor.

eZDBFileHandler::fetch ( )

Fetches file from db and saves it in FS under the same name.

eZDBFileHandler::fetchContents ( )

Returns file contents.

Returns
contents string, or false in case of an error.
eZDBFileHandler::fetchUnique ( )
static

Fetches file from db and saves it in FS under unique name.

Returns
filename with path of a saved file. You can use this filename to get contents of file from filesystem.
eZDBFileHandler::fileCopy (   $srcPath,
  $dstPath 
)
static

Copy file.

eZDBFileHandler::fileDelete (   $path)
static

Deletes specified file/directory.

If a directory specified it is deleted recursively.

eZDBFileHandler::fileDeleteByDirList (   $dirList,
  $commonPath,
  $commonSuffix 
)
static
eZDBFileHandler::fileDeleteByRegex (   $dir,
  $fileRegex 
)
static
eZDBFileHandler::fileDeleteByWildcard (   $wildcard)
static
eZDBFileHandler::fileDeleteLocal (   $path)
static

Deletes a file that has been fetched before.

eZDBFileHandler::fileExists (   $path)
static

Check if given file/dir exists.

eZDBFileHandler::fileFetch (   $filePath)
static

Fetches file from db and saves it in FS under the same name.

eZDBFileHandler::fileFetchContents (   $filePath)
static

Returns file contents.

Returns
contents string, or false in case of an error.
eZDBFileHandler::fileLinkCopy (   $srcPath,
  $dstPath,
  $symLink 
)
static

Create symbolic or hard link to file.

eZDBFileHandler::fileMove (   $srcPath,
  $dstPath 
)
static

Move file.

eZDBFileHandler::fileStore (   $filePath,
  $scope = false,
  $delete = false,
  $datatype = false 
)
static
Parameters
$filePathPath to the file being stored.
$scopeMeans something like "file category". May be used to clean caches of a certain type.
$deletetrue if the file should be deleted after storing.
eZDBFileHandler::fileStoreContents (   $filePath,
  $contents,
  $scope = false,
  $datatype = false 
)
static

Store file contents.

eZDBFileHandler::getFileList (   $skipBinaryFiles = false,
  $skipImages = false 
)

Get list of files stored in database.

Used in bin/php/clusterize.php.

eZDBFileHandler::loadMetaData (   $force = false)

Load file meta information.

Parameters
$forceFile stats will be refreshed if true

Referenced by eZDBFileHandler().

eZDBFileHandler::move (   $dstPath)

Move file.

eZDBFileHandler::mtime ( )

Returns file modification time.

eZDBFileHandler::name ( )

Returns file name.

eZDBFileHandler::passthrough ( )

Outputs file contents prepending them with appropriate HTTP headers.

eZDBFileHandler::size ( )

Returns file size.

eZDBFileHandler::stat ( )

Returns file metadata.

eZDBFileHandler::storeContents (   $contents,
  $scope = false,
  $datatype = false 
)

Store file contents.


The documentation for this class was generated from the following file: