aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/filestore.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-01 15:40:36 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-01 15:40:36 +0000
commitdc9f5014c298fe28983d024ad2d9e5d04b7f1dfa (patch)
treee6a90f45e28bdd0a07ebb26d9828837ade1d6ebc /engine/lib/filestore.php
parent172603e9d31436ecc2ad12f48cd8f26ad8d033f5 (diff)
downloadelgg-dc9f5014c298fe28983d024ad2d9e5d04b7f1dfa.tar.gz
elgg-dc9f5014c298fe28983d024ad2d9e5d04b7f1dfa.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Added tell git-svn-id: https://code.elgg.org/elgg/trunk@606 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/filestore.php')
-rw-r--r--engine/lib/filestore.php25
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.