PHP Класс ElggFilestore, Elgg

Автор: Curverider Ltd
Показать файл Открыть проект

Открытые методы

Метод Описание
close ( mixed $f ) : boolean Close a given file handle.
delete ( ElggFile $file, boolean $follow_symlinks = true ) : boolean Delete the file associated with a given file handle.
eof ( mixed $f ) : boolean Return a whether the end of a file has been reached.
exists ( ElggFile $file ) : boolean Return whether a file physically exists or not.
getFileSize ( ElggFile $file ) : integer Return the size in bytes for a given file.
getFilenameOnFilestore ( ElggFile $file ) : string Return the filename of a given file as stored on the filestore.
getParameters ( ) : array Get the filestore's creation parameters as an associative array.
grabFile ( ElggFile $file ) : mixed Get the contents of the whole file.
open ( ElggFile $file, string $mode ) : mixed Attempt to open the file $file for storage or writing.
read ( mixed $f, integer $length, integer $offset ) : mixed Read data from a filestore.
seek ( mixed $f, integer $position ) : integer Seek a given position within a file handle.
setParameters ( array $parameters ) : boolean Set the parameters from the associative array produced by $this->getParameters().
tell ( mixed $f ) : integer Return the current position in an open file.
write ( mixed $f, string $data ) : integer Write data to a given file handle.

Описание методов

close() абстрактный публичный Метод

Close a given file handle.
abstract public close ( mixed $f ) : boolean
$f mixed The file handle
Результат boolean

delete() абстрактный публичный Метод

Delete the file associated with a given file handle.
abstract public delete ( ElggFile $file, boolean $follow_symlinks = true ) : boolean
$file ElggFile The file
$follow_symlinks boolean If true, will also delete the target file if the current file is a symlink
Результат boolean

eof() абстрактный публичный Метод

Return a whether the end of a file has been reached.
abstract public eof ( mixed $f ) : boolean
$f mixed The file handle.
Результат boolean

exists() абстрактный публичный Метод

Return whether a file physically exists or not.
abstract public exists ( ElggFile $file ) : boolean
$file ElggFile The file
Результат boolean

getFileSize() абстрактный публичный Метод

Return the size in bytes for a given file.
abstract public getFileSize ( ElggFile $file ) : integer
$file ElggFile The file
Результат integer

getFilenameOnFilestore() абстрактный публичный Метод

Return the filename of a given file as stored on the filestore.
abstract public getFilenameOnFilestore ( ElggFile $file ) : string
$file ElggFile The file
Результат string

getParameters() абстрактный публичный Метод

Used for serialisation and for storing the creation details along side a file object.
abstract public getParameters ( ) : array
Результат array

grabFile() абстрактный публичный Метод

Get the contents of the whole file.
abstract public grabFile ( ElggFile $file ) : mixed
$file ElggFile The file handle.
Результат mixed The file contents.

open() абстрактный публичный Метод

Attempt to open the file $file for storage or writing.
abstract public open ( ElggFile $file, string $mode ) : mixed
$file ElggFile A file
$mode string "read", "write", "append"
Результат mixed A handle to the opened file or false on error.

read() абстрактный публичный Метод

Read data from a filestore.
abstract public read ( mixed $f, integer $length, integer $offset ) : mixed
$f mixed The file handle
$length integer Length in bytes to read.
$offset integer The optional offset.
Результат mixed String of data or false on error.

seek() абстрактный публичный Метод

Seek a given position within a file handle.
abstract public seek ( mixed $f, integer $position ) : integer
$f mixed The file handle.
$position integer The position.
Результат integer 0 for success, or -1

setParameters() абстрактный публичный Метод

Set the parameters from the associative array produced by $this->getParameters().
abstract public setParameters ( array $parameters ) : boolean
$parameters array A list of parameters
Результат boolean

tell() абстрактный публичный Метод

Return the current position in an open file.
abstract public tell ( mixed $f ) : integer
$f mixed The file handle.
Результат integer

write() абстрактный публичный Метод

Write data to a given file handle.
abstract public write ( mixed $f, string $data ) : integer
$f mixed The file handle - exactly what this is depends on the file system
$data string The binary string of data to write
Результат integer Number of bytes written.