Class: ClientFile

Source Location: /class/fileHandling.php.inc

Class Overview

ClientBaseFile
   |
   --ClientFile




Variables

Methods

Inherited Variables

Class: ClientBaseFile

ClientBaseFile::$exists
ClientBaseFile::$fileService
ClientBaseFile::$isExecutable
ClientBaseFile::$isHidden
ClientBaseFile::$isReadable
ClientBaseFile::$isWritable
ClientBaseFile::$lastModifyTimestamp
ClientBaseFile::$name
ClientBaseFile::$path

Class Variables

$isDirectory =  FALSE

access:  public
Type:   mixed
Overrides:   Array

$size =

access:  public
Type:   mixed



Class Methods


method execute() [line 1680]

void execute( [array $args = array()], [bool $async = TRUE], [object|string $handlerObj = NULL], [string $handlerMethod = NULL])

Executes the file

The handler receives these parameters:

  • ClientFileService $fileService - this object
  • bool $status: indicates whether the operation was successful
  • string $path: the remote path


access:  public

Parameters:

array   $args   Arguments for the executable
bool   $async   If TRUE, the file is executed in the background. If FALSE, the application blocks until the executable ends
object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]

method monitor() [line 1661]

void monitor( object|string $handlerObj, string $handlerMethod)

Starts monitoring the file

The handler receives these parameters when the file is created, removed or changed:

  • ClientFileService $fileService - this object
  • string $path: the remote path
  • bool $exists: whether the file exists
  • int $modificationTime: the modification time of the file
  • int $size: file size


access:  public

Parameters:

object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]

method read() [line 1557]

FileUploader read( string $localPath, [object|string $handlerObj = NULL], [string $handlerMethod = NULL])

Copies a file from client to server

Returns the FileUploader object to allow progress checking. The handler is attached to the 'finished', 'failed' and 'cancelled' events of the FileUploader.


return:  The transfer object keeping track of transfer progress
access:  public

Parameters:

string   $localPath   The path on the server side
object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]

method readToStream() [line 1625]

FileToStringUploader readToStream( resource $stream, [object|string $handlerObj = NULL], [string $handlerMethod = NULL])

Reads a file on the client side to a stream

Returns the FileToStreamUploader object to allow progress checking. The handler is attached to the 'finished', 'failed' and 'cancelled' events of the FileToStreamUploader.


return:  The transfer object keeping track of transfer progress
access:  public

Parameters:

resource   $stream   Stream to write to
object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]

method readToString() [line 1590]

FileToStringUploader readToString( [object|string $handlerObj = NULL], [string $handlerMethod = NULL])

Reads a file on the client side to a string

Returns the FileToStringUploader object to allow progress checking. The handler is attached to the 'finished', 'failed' and 'cancelled' events of the FileToStringUploader. The file contents are put in the FileToStringUploader::$data property


return:  The transfer object keeping track of transfer progress
access:  public

Parameters:

object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]

method remove() [line 1642]

void remove( [object|string $handlerObj = NULL], [string $handlerMethod = NULL])

Removes the file

The handler receives these parameters:

  • ClientFileService $fileService - this object
  • bool $status: indicates whether the operation was successful
  • string $path: the remote path


access:  public

Parameters:

object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]

method write() [line 1540]

FileDownloader write( string $localPath, [object|string $handlerObj = NULL], [string $handlerMethod = NULL])

Copies a file from server to client

Returns the FileDownloader object to allow progress checking. The handler is attached to the 'finished', 'failed' and 'cancelled' events of the FileDownloader.


return:  The transfer object keeping track of transfer progress
access:  public

Parameters:

string   $localPath   The path on the server side
object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]

method writeFromStream() [line 1608]

FileFromStreamDownloader writeFromStream( resource $stream, int $length, [object|string $handlerObj = NULL], [string $handlerMethod = NULL])

Read from a stream and write to a file on the client side

Returns the FileFromStreamDownloader object to allow progress checking. The handler is attached to the 'finished', 'failed' and 'cancelled' events of the FileFromStreamDownloader.


return:  The transfer object keeping track of transfer progress
access:  public

Parameters:

resource   $stream   Stream to read from
int   $length   Amount of bytes to read from the stream and write to the file
object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]

method writeFromString() [line 1574]

FileFromStringDownloader writeFromString( string $data, [object|string $handlerObj = NULL], [string $handlerMethod = NULL])

Stores a string in a file on the client side

Returns the FileFromStringDownloader object to allow progress checking. The handler is attached to the 'finished', 'failed' and 'cancelled' events of the FileFromStringDownloader.


return:  The transfer object keeping track of transfer progress
access:  public

Parameters:

string   $data   Data to write to the file
object|string   $handlerObj   The object or classname to call the handler on when the operation finishes
string   $handlerMethod   The method to call on the handler object

[ Top ]


Documentation generated on Mon, 07 Apr 2014 00:51:14 +0200 by phpDocumentor 1.4.3