]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/iterator/io/class_FileIoIterator.php
Continued on file-based stack:
[core.git] / inc / classes / main / iterator / io / class_FileIoIterator.php
index 1d5469220c6af91229ec0d73c5895f886ab207ec..61045519510c6b2df2a7fc3196ceb2976af05df4 100644 (file)
@@ -25,12 +25,12 @@ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterato
        /**
         * Current absolute seek position (returned by key())
         */
-       private $seekPosition = -1;
+       private $seekPosition = FALSE;
 
        /**
         * Total entries (read from file)
         */
-       private $totalEntriesFile = -1;
+       private $totalEntriesFile = FALSE;
 
        /**
         * Protected constructor
@@ -117,6 +117,19 @@ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterato
                $this->partialStub('Please implement this method. seekPosition=' . $seekPosition);
        }
 
+       /**
+        * Size of file stack
+        *
+        * @return      $size   Size (in bytes) of file
+        */
+       public function size () {
+               // Call the pointer object
+               $size = $this->getPointerInstance()->size();
+
+               // Return result
+               return $size;
+       }
+
        /**
         * Checks wether the current entry is valid (not at the end of the file).
         * This method will return TRUE if an emptied (nulled) entry has been found.