kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php

Show: inherited
Table of Contents

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

Package: kernel

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

Propertyprotectedstring  $mountPointPath= ''

Path to the local distributed filesystem mount point

Details
Type
string

Methods

methodpublic__construct( ) : void

methodprotectedaccumulatorStart( ) : void

methodprotectedaccumulatorStop( ) : void

methodpubliccopyFromDFS( string $srcFilePath, string $dstFilePath = false ) : bool

Copies the DFS file $srcFilePath to FS

Parameters
Name Type Description
$srcFilePath string

Source file path (on DFS)

$dstFilePath string

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

Returns
Type Description
bool
methodpubliccopyFromDFSToDFS( string $srcFilePath, string $dstFilePath ) : void

Creates 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

methodpubliccopyToDFS( string $srcFilePath, string $dstFilePath = false ) : void

Copies 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

methodpubliccreateFileOnDFS( string $filePath, \binary $contents ) : bool

Creates the file $filePath on DFS with content $contents

Parameters
Name Type Description
$filePath string
$contents \binary
Returns
Type Description
bool
methodpublicdelete( string | array $filePath ) : bool

Deletes one or more files from DFS

Parameters
Name Type Description
$filePath string | array

Single local filename, or array of local filenames

Returns
Type Description
bool true if deletion was successful, false otherwise
Details
Todo
Improve error handling using exceptions  
methodpublicexistsOnDFS( string $filePath ) : bool

Checks if a file exists on the DFS

Parameters
Name Type Description
$filePath string
Returns
Type Description
bool
methodpublicgetContents( string $filePath ) : \binary | bool

Returns the binary content of $filePath from DFS

Parameters
Name Type Description
$filePath string

local file path

Returns
Type Description
\binary | bool file's content, or false
Details
Todo
Handle errors using exceptions  
methodpublicgetMountPoint( ) : string

Returns the mount point

Returns
Type Description
string
methodprotectedmakeDFSPath( string $filePath ) : string

Computes the DFS file path based on a relative file path

Parameters
Name Type Description
$filePath string
Returns
Type Description
string the absolute DFS file path
methodpublicpassthrough( string $filePath, int $startOffset = 0, false | int $length = false ) : bool

Sends the contents of $filePath to default output

Parameters
Name Type Description
$filePath string

File path

$startOffset int

Starting offset

$length false | int

Length to transmit, false means everything

Returns
Type Description
bool true, or false if operation failed
methodpublicrenameOnDFS( string $oldPath, string $newPath ) : bool

Renamed DFS file $oldPath to DFS file $newPath

Parameters
Name Type Description
$oldPath string
$newPath string
Returns
Type Description
bool
Documentation was generated by DocBlox 0.18.1.