PHP 클래스 ElggFilestore, Elgg

저자: Curverider Ltd
파일 보기 프로젝트 열기: elgg/elgg

공개 메소드들

메소드 설명
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.