diff options
Diffstat (limited to 'engine/lib/filestore.php')
-rw-r--r-- | engine/lib/filestore.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php index 62de55b9e..d1186dea7 100644 --- a/engine/lib/filestore.php +++ b/engine/lib/filestore.php @@ -58,6 +58,14 @@ abstract public function seek($f, $position); /** + * Return a whether the end of a file has been reached. + * + * @param mixed $f The file handle. + * @return boolean + */ + abstract public function eof($f); + + /** * Close a given file handle. * * @param mixed $f @@ -190,6 +198,11 @@ return fseek($f, $position); } + public function eof($f) + { + return feof($f); + } + public function getFileSize(ElggFile $file) { $name = $file->getFilename(); @@ -432,6 +445,16 @@ } /** + * Return a boolean value whether the file handle is at the end of the file + */ + public function eof() + { + $fs = $this->getFilestore(); + + return $fs->eof($this->handle); + } + + /** * Set a filestore. * * @param ElggFilestore $filestore The file store. |