Methods summary
abstract public
mixed
|
#
open( ElggFile $file, string $mode )
Attempt to open the file $file for storage or writing.
Attempt to open the file $file for storage or writing.
Parameters
- $file
ElggFile
$file A file
- $mode
string $mode "read", "write", "append"
Returns
mixed A handle to the opened file or false on error.
|
abstract public
integer
|
#
write( mixed $f, string $data )
Write data to a given file handle.
Write data to a given file handle.
Parameters
- $f
mixed $f The file handle - exactly what this is depends on the file system
- $data
string $data The binary string of data to write
Returns
integer Number of bytes written.
|
abstract public
mixed
|
#
read( mixed $f, integer $length, integer $offset = 0 )
Read data from a filestore.
Read data from a filestore.
Parameters
- $f
mixed $f The file handle
- $length
integer $length Length in bytes to read.
- $offset
integer $offset The optional offset.
Returns
mixed String of data or false on error.
|
abstract public
|
#
seek( mixed $f, integer $position )
Seek a given position within a file handle.
Seek a given position within a file handle.
Parameters
- $f
mixed $f The file handle.
- $position
integer $position The position.
|
abstract public
boolean
|
#
eof( mixed $f )
Return a whether the end of a file has been reached.
Return a whether the end of a file has been reached.
Parameters
- $f
mixed $f The file handle.
Returns
boolean
|
abstract public
integer
|
#
tell( mixed $f )
Return the current position in an open file.
Return the current position in an open file.
Parameters
- $f
mixed $f The file handle.
Returns
integer
|
abstract public
boolean
|
#
close( mixed $f )
Close a given file handle.
Close a given file handle.
Parameters
- $f
mixed $f The file handle
Returns
boolean
|
abstract public
boolean
|
#
delete( ElggFile $file )
Delete the file associated with a given file handle.
Delete the file associated with a given file handle.
Parameters
Returns
boolean
|
abstract public
integer
|
#
getFileSize( ElggFile $file )
Return the size in bytes for a given file.
Return the size in bytes for a given file.
Parameters
Returns
integer
|
abstract public
string
|
#
getFilenameOnFilestore( ElggFile $file )
Return the filename of a given file as stored on the filestore.
Return the filename of a given file as stored on the filestore.
Parameters
Returns
string
|
abstract public
array
|
#
getParameters( )
Get the filestore's creation parameters as an associative array. Used for
serialisation and for storing the creation details along side a file object.
Get the filestore's creation parameters as an associative array. Used for
serialisation and for storing the creation details along side a file object.
Returns
array
|
abstract public
boolean
|
#
setParameters( array $parameters )
Set the parameters from the associative array produced by
$this->getParameters().
Set the parameters from the associative array produced by
$this->getParameters().
Parameters
- $parameters
array $parameters A list of parameters
Returns
boolean
|
abstract public
mixed
|
#
grabFile( ElggFile $file )
Get the contents of the whole file.
Get the contents of the whole file.
Parameters
- $file
mixed $file The file handle.
Returns
mixed The file contents.
|
abstract public
boolean
|
#
exists( ElggFile $file )
Return whether a file physically exists or not.
Return whether a file physically exists or not.
Parameters
Returns
boolean
|