kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php
File containing the eZDFSFileHandlerDFSBackend class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- kernel
- Version
- 4.6.0
\eZDFSFileHandlerDFSBackend
File containing the eZDFSFileHandlerDFSBackend class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Version
- 4.6.0
Properties
Methods

copyFromDFS(
string $srcFilePath, string $dstFilePath
=
false
)
:
boolCopies the DFS file $srcFilePath to FS
| 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
| 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
| 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
| Name | Type | Description |
|---|---|---|
| $filePath | string | |
| $contents | \binary |
| Type | Description |
|---|---|
| bool |

delete(
string | array $filePath
)
:
boolDeletes one or more files from DFS
| 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

existsOnDFS(
string $filePath
)
:
boolChecks if a file exists on the DFS
| Name | Type | Description |
|---|---|---|
| $filePath | string |
| Type | Description |
|---|---|
| bool |

getContents(
string $filePath
)
:
\binary | boolReturns the binary content of $filePath from DFS
| 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
| Name | Type | Description |
|---|---|---|
| $filePath | string |
| Type | Description |
|---|---|
| string | the absolute DFS file path |

passthrough(
string $filePath, int $startOffset
=
0, false | int $length
=
false
)
:
boolSends the contents of $filePath to default output
| Name | Type | Description |
|---|---|---|
| $filePath | string | File path |
| $startOffset | int | Starting offset |
| $length | false | int | Length to transmit, false means everything |
| Type | Description |
|---|---|
| bool | true, or false if operation failed |