diff options
Diffstat (limited to 'engine/lib/filestore.php')
-rw-r--r-- | engine/lib/filestore.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php index d1186dea7..662bf81ec 100644 --- a/engine/lib/filestore.php +++ b/engine/lib/filestore.php @@ -66,6 +66,14 @@ abstract public function eof($f); /** + * Return the current position in an open file. + * + * @param mixed $f The file handle. + * @return int + */ + abstract public function tell($f); + + /** * Close a given file handle. * * @param mixed $f @@ -198,6 +206,11 @@ return fseek($f, $position); } + public function tell($f) + { + return ftell($f); + } + public function eof($f) { return feof($f); @@ -435,6 +448,18 @@ return $fs->seek($this->handle, $position); } + + /** + * Return the current position of the file. + * + * @return int The file position + */ + public function tell() + { + $fs = $this->tell(); + + return $fs->tell($this->handle); + } /** * Return the size of the file in bytes. |