diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-05-01 15:33:02 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-05-01 15:33:02 +0000 |
commit | 172603e9d31436ecc2ad12f48cd8f26ad8d033f5 (patch) | |
tree | 7c418a4adbc819e46b67a73e88180449f0e8d1d8 /engine/lib/filestore.php | |
parent | 872c762193858adfcf7a7621f3d86d2f30a346fb (diff) | |
download | elgg-172603e9d31436ecc2ad12f48cd8f26ad8d033f5.tar.gz elgg-172603e9d31436ecc2ad12f48cd8f26ad8d033f5.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Added eof functionality to datastore
git-svn-id: https://code.elgg.org/elgg/trunk@605 36083f99-b078-4883-b0ff-0f9b5a30f544
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. |