kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php
\eZDFSFileHandlerDFSBackend
Package:
Properties
Methods

copyFromDFS(
string $srcFilePath, string $dstFilePath
=
false
)
:
boolCopies the DFS file $srcFilePath to FS
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $srcFilePath | string | Source file path (on DFS) |
| $dstFilePath | string | Destination file path (on FS). If not specified, $srcFilePath is used |
| Type | Description |
|---|---|
| bool |

copyFromDFSToDFS(
string $srcFilePath, string $dstFilePath
)
:
voidCreates a copy of $srcFilePath from DFS to $dstFilePath on DFS
Parameters
| Name | Type | Description |
|---|---|---|
| $srcFilePath | string | Local source file path |
| $dstFilePath | string | Local destination file path |

copyToDFS(
string $srcFilePath, string $dstFilePath
=
false
)
:
voidCopies the local file $filePath to DFS under the same name, or a new name if specified
Parameters
| Name | Type | Description |
|---|---|---|
| $srcFilePath | string | Local file path to copy from |
| $dstFilePath | string | Optional path to copy to. If not specified, $srcFilePath is used |

createFileOnDFS(
string $filePath, \binary $contents
)
:
boolCreates the file $filePath on DFS with content $contents
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $filePath | string | |
| $contents | \binary |
| Type | Description |
|---|---|
| bool |

delete(
string | array $filePath
)
:
boolDeletes one or more files from DFS
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $filePath | string | array | Single local filename, or array of local filenames |
| Type | Description |
|---|---|
| bool | true if deletion was successful, false otherwise |
- Todo
- Improve error handling using exceptions

getContents(
string $filePath
)
:
\binary | boolReturns the binary content of $filePath from DFS
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $filePath | string | local file path |
| Type | Description |
|---|---|
| \binary | bool | file's content, or false |
- Todo
- Handle errors using exceptions

makeDFSPath(
string $filePath
)
:
stringComputes the DFS file path based on a relative file path
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $filePath | string |
| Type | Description |
|---|---|
| string | the absolute DFS file path |

passthrough(
string $filePath
)
:
boolSends the contents of $filePath to default output
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $filePath | string |
| Type | Description |
|---|---|
| bool | true, or false if operation failed |