eZ Publish Community Project (Legacy Stack) 2013.4
Class

eZDFSFileHandlerDFSBackend

class eZDFSFileHandlerDFSBackend

File containing the eZDFSFileHandlerDFSBackend class.

Methods

__construct()

copyFromDFSToDFS(string $srcFilePath, string $dstFilePath)

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

bool copyFromDFS(string $srcFilePath, string $dstFilePath = false)

Copies the DFS file $srcFilePath to FS

bool copyToDFS(string $srcFilePath, bool|string $dstFilePath = false)

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

bool delete(string|array $filePath)

Deletes one or more files from DFS

bool passthrough(string $filePath, int $startOffset, bool|int $length = false)

Sends the contents of $filePath to default output

binary|bool getContents(string $filePath)

Returns the binary content of $filePath from DFS

bool createFileOnDFS(string $filePath, binary $contents)

Creates the file $filePath on DFS with content $contents

bool renameOnDFS(string $oldPath, string $newPath)

Renamed DFS file $oldPath to DFS file $newPath

bool existsOnDFS(string $filePath)

Checks if a file exists on the DFS

string getMountPoint()

Returns the mount point

int getDfsFileSize(string $filePath)

Returns size of a file in the DFS backend, from a relative path.

Details

at line 13
public __construct()

at line 37
public copyFromDFSToDFS(string $srcFilePath, string $dstFilePath)

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

Parameters

string $srcFilePath Local source file path
string $dstFilePath Local destination file path

at line 67
public bool copyFromDFS(string $srcFilePath, string $dstFilePath = false)

Copies the DFS file $srcFilePath to FS

Parameters

string $srcFilePath Source file path (on DFS)
string $dstFilePath Destination file path (on FS). If not specified, $srcFilePath is used

Return Value

bool

at line 102
public bool copyToDFS(string $srcFilePath, bool|string $dstFilePath = false)

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

Parameters

string $srcFilePath Local file path to copy from
bool|string $dstFilePath Optional path to copy to. If not specified, $srcFilePath is used

Return Value

bool

at line 147
public bool delete(string|array $filePath)

Deletes one or more files from DFS

Parameters

string|array $filePath Single local filename, or array of local filenames

Return Value

bool true if deletion was successful, false otherwise

at line 186
public bool passthrough(string $filePath, int $startOffset, bool|int $length = false)

Sends the contents of $filePath to default output

Parameters

string $filePath File path
int $startOffset Starting offset
bool|int $length Length to transmit, false means everything

Return Value

bool true, or false if operation failed

at line 202
public binary|bool getContents(string $filePath)

Returns the binary content of $filePath from DFS

Parameters

string $filePath local file path

Return Value

binary|bool file's content, or false

at line 223
public bool createFileOnDFS(string $filePath, binary $contents)

Creates the file $filePath on DFS with content $contents

Parameters

string $filePath
binary $contents

Return Value

bool

at line 242
public bool renameOnDFS(string $oldPath, string $newPath)

Renamed DFS file $oldPath to DFS file $newPath

Parameters

string $oldPath
string $newPath

Return Value

bool

at line 265
public bool existsOnDFS(string $filePath)

Checks if a file exists on the DFS

Parameters

string $filePath

Return Value

bool

at line 275
public string getMountPoint()

Returns the mount point

Return Value

string

at line 325
public int getDfsFileSize(string $filePath)

Returns size of a file in the DFS backend, from a relative path.

Parameters

string $filePath The relative file path we want to get size of

Return Value

int