]> git.mxchange.org Git - core.git/blobdiff - inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php
Uh, need this method now, but does it work this way?
[core.git] / inc / classes / interfaces / iterator / class_SeekableWritableFileIterator.php
index 48dd8db4dcbba6603b64cd95e1d377ecbb76198e..263bba6887bef605933e8a9fbee5ec1bd5cd59cd 100644 (file)
@@ -27,9 +27,42 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * Seeks to given position
         *
         * @param       $seekPosition   Seek position in file
+        * @return      $status                 Status of this operation
+        */
+       function seek ($seekPosition);
+
+       /**
+        * Size of file stack
+        *
+        * @return      $size   Size (in bytes) of file
+        */
+       function size ();
+
+       /**
+        * Writes at given position by seeking to it.
+        *
+        * @param       $seekPosition   Seek position in file
+        * @param       $data                   Data to be written
+        * @return      void
+        */
+       function writeAtPosition ($seedPosition, $data);
+
+       /**
+        * Reads given amount of bytes from file.
+        *
+        * @param       $bytes  Amount of bytes to read
+        * @return      $data   Data read from file
+        */
+       function read ($bytes);
+
+       /**
+        * Analyzes entries in index file. This will count all found (and valid)
+        * entries, mark invalid as damaged and count gaps ("fragmentation"). If
+        * only gaps are found, the file is considered as "virgin" (no entries).
+        *
         * @return      void
         */
-       function seek ($seedPosition);
+       function analyzeFile ();
 }
 
 // [EOF]