This class defines the interface for all elgg data repositories.
More...
This class defines the interface for all elgg data repositories.
Definition at line 8 of file Filestore.php.
Elgg\Filesystem\Filestore::close |
( |
|
$f | ) |
|
|
abstract |
Close a given file handle.
- Parameters
-
- Returns
- bool
Elgg\Filesystem\Filestore::delete |
( |
\ElggFile |
$file, |
|
|
bool |
$follow_symlinks = true |
|
) |
| |
|
abstract |
Delete the file associated with a given file handle.
- Parameters
-
\ElggFile | $file | The file |
bool | $follow_symlinks | If true, will also delete the target file if the current file is a symlink |
- Returns
- bool
Elgg\Filesystem\Filestore::eof |
( |
|
$f | ) |
|
|
abstract |
Return a whether the end of a file has been reached.
- Parameters
-
- Returns
- boolean
Elgg\Filesystem\Filestore::exists |
( |
\ElggFile |
$file | ) |
|
|
abstract |
Return whether a file physically exists or not.
- Parameters
-
- Returns
- bool
Elgg\Filesystem\Filestore::getFilenameOnFilestore |
( |
\ElggFile |
$file | ) |
|
|
abstract |
Return the filename of a given file as stored on the filestore.
- Parameters
-
- Returns
- string
Elgg\Filesystem\Filestore::getFileSize |
( |
\ElggFile |
$file | ) |
|
|
abstract |
Return the size in bytes for a given file.
- Parameters
-
- Returns
- int
Elgg\Filesystem\Filestore::getParameters |
( |
| ) |
|
|
abstract |
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
Elgg\Filesystem\Filestore::grabFile |
( |
\ElggFile |
$file | ) |
|
|
abstract |
Get the contents of the whole file.
- Parameters
-
mixed | $file | The file handle. |
- Returns
- mixed The file contents.
Elgg\Filesystem\Filestore::open |
( |
\ElggFile |
$file, |
|
|
string |
$mode |
|
) |
| |
|
abstract |
Attempt to open the file $file for storage or writing.
- Parameters
-
\ElggFile | $file | A file |
string | $mode | "read", "write", "append" |
- Returns
- mixed A handle to the opened file or false on error.
Elgg\Filesystem\Filestore::read |
( |
|
$f, |
|
|
int |
$length, |
|
|
int |
$offset = 0 |
|
) |
| |
|
abstract |
Read data from a filestore.
- Parameters
-
mixed | $f | The file handle |
int | $length | Length in bytes to read. |
int | $offset | The optional offset. |
- Returns
- mixed String of data or false on error.
Elgg\Filesystem\Filestore::seek |
( |
|
$f, |
|
|
int |
$position |
|
) |
| |
|
abstract |
Seek a given position within a file handle.
- Parameters
-
mixed | $f | The file handle. |
int | $position | The position. |
- Returns
- int 0 for success, or -1
Elgg\Filesystem\Filestore::setParameters |
( |
array |
$parameters | ) |
|
|
abstract |
Set the parameters from the associative array produced by $this->getParameters().
- Parameters
-
array | $parameters | A list of parameters |
- Returns
- bool
Elgg\Filesystem\Filestore::tell |
( |
|
$f | ) |
|
|
abstract |
Return the current position in an open file.
- Parameters
-
- Returns
- int|false
Elgg\Filesystem\Filestore::write |
( |
|
$f, |
|
|
string |
$data |
|
) |
| |
|
abstract |
Write data to a given file handle.
- Parameters
-
mixed | $f | The file handle - exactly what this is depends on the file system |
string | $data | The binary string of data to write |
- Returns
- int Number of bytes written
The documentation for this class was generated from the following file: