eZPublish  4.5
eZDFSFileHandlerDFSBackend Class Reference

Public Member Functions

 __construct ()
 
 copyFromDFS ($srcFilePath, $dstFilePath=false)
 Copies the DFS file $srcFilePath to FS. More...
 
 copyFromDFSToDFS ($srcFilePath, $dstFilePath)
 Creates a copy of $srcFilePath from DFS to $dstFilePath on DFS. More...
 
 copyToDFS ($srcFilePath, $dstFilePath=false)
 Copies the local file $filePath to DFS under the same name, or a new name if specified. More...
 
 createFileOnDFS ($filePath, $contents)
 Creates the file $filePath on DFS with content $contents. More...
 
 delete ($filePath)
 Deletes one or more files from DFS. More...
 
 getContents ($filePath)
 Returns the binary content of $filePath from DFS. More...
 
 passthrough ($filePath)
 Sends the contents of $filePath to default output. More...
 
 renameOnDFS ($oldPath, $newPath)
 Renamed DFS file $oldPath to DFS file $newPath. More...
 

Protected Member Functions

 accumulatorStart ()
 
 accumulatorStop ()
 
 makeDFSPath ($filePath)
 Computes the DFS file path based on a relative file path. More...
 

Protected Attributes

 $mountPointPath
 

Constructor & Destructor Documentation

eZDFSFileHandlerDFSBackend::__construct ( )

Member Function Documentation

eZDFSFileHandlerDFSBackend::accumulatorStart ( )
protected
eZDFSFileHandlerDFSBackend::accumulatorStop ( )
protected
eZDFSFileHandlerDFSBackend::copyFromDFS (   $srcFilePath,
  $dstFilePath = false 
)

Copies the DFS file $srcFilePath to FS.

Parameters
string$srcFilePathSource file path (on DFS)
string$dstFilePathDestination file path (on FS). If not specified, $srcFilePath is used
Returns
bool
eZDFSFileHandlerDFSBackend::copyFromDFSToDFS (   $srcFilePath,
  $dstFilePath 
)

Creates a copy of $srcFilePath from DFS to $dstFilePath on DFS.

Parameters
string$srcFilePathLocal source file path
string$dstFilePathLocal destination file path
eZDFSFileHandlerDFSBackend::copyToDFS (   $srcFilePath,
  $dstFilePath = false 
)

Copies the local file $filePath to DFS under the same name, or a new name if specified.

Parameters
string$srcFilePathLocal file path to copy from
string$dstFilePathOptional path to copy to. If not specified, $srcFilePath is used
eZDFSFileHandlerDFSBackend::createFileOnDFS (   $filePath,
  $contents 
)

Creates the file $filePath on DFS with content $contents.

Parameters
string$filePath
binary$contents
Returns
bool
eZDFSFileHandlerDFSBackend::delete (   $filePath)

Deletes one or more files from DFS.

Parameters
string | array$filePathSingle local filename, or array of local filenames
Returns
bool true if deletion was successful, false otherwise
Todo:
Improve error handling using exceptions
eZDFSFileHandlerDFSBackend::getContents (   $filePath)

Returns the binary content of $filePath from DFS.

Parameters
string$filePathlocal file path
Returns
binary|bool file's content, or false
Todo:
Handle errors using exceptions
eZDFSFileHandlerDFSBackend::makeDFSPath (   $filePath)
protected

Computes the DFS file path based on a relative file path.

Parameters
string$filePath
Returns
string the absolute DFS file path

Referenced by copyFromDFS(), copyFromDFSToDFS(), copyToDFS(), createFileOnDFS(), delete(), getContents(), passthrough(), and renameOnDFS().

eZDFSFileHandlerDFSBackend::passthrough (   $filePath)

Sends the contents of $filePath to default output.

Parameters
string$filePath
Returns
bool true, or false if operation failed
eZDFSFileHandlerDFSBackend::renameOnDFS (   $oldPath,
  $newPath 
)

Renamed DFS file $oldPath to DFS file $newPath.

Parameters
string$oldPath
string$newPath
Returns
bool

Member Data Documentation

eZDFSFileHandlerDFSBackend::$mountPointPath
protected

Referenced by __construct().


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