]> git.mxchange.org Git - core.git/blobdiff - framework/main/interfaces/iterator/file/class_SeekableWritableFileIterator.php
WIP:
[core.git] / framework / main / interfaces / iterator / file / class_SeekableWritableFileIterator.php
index 64e49f53176d10750ad1fb89313bb561b205f903..65c57c30691b23d48d3cdc28dc69fbf186859a3d 100644 (file)
@@ -136,6 +136,30 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         */
        function getFileSize ();
 
+       /**
+        * Getter for seek position
+        *
+        * @return      $seekPosition   Current seek position (stored here in object)
+        */
+       function getSeekPosition ();
+
+       /**
+        * Searches for next suitable gap the given length of data can fit in
+        * including padding bytes.
+        *
+        * @param       $length                 Length of raw data
+        * @return      $seekPosition   Found next gap's seek position
+        */
+       function searchNextGap (int $length);
+
+       /**
+        * Checks whether the abstracted file only contains gaps by counting all
+        * gaps' bytes together and compare it to total length.
+        *
+        * @return      $isGapsOnly             Whether the abstracted file only contains gaps
+        */
+       function isFileGapsOnly();
+
        /**
         * Writes data at given position
         *
@@ -155,13 +179,6 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         */
        function writeAtPosition (int $seedPosition, string $data);
 
-       /**
-        * Getter for seek position
-        *
-        * @return      $seekPosition   Current seek position (stored here in object)
-        */
-       function getSeekPosition ();
-
        /**
         * Writes given value to the file and returns a hash and gap position for it
         *
@@ -181,13 +198,4 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         */
        function writeDataToFreeGap (string $groupId, string $hash, string $encoded);
 
-       /**
-        * Searches for next suitable gap the given length of data can fit in
-        * including padding bytes.
-        *
-        * @param       $length                 Length of raw data
-        * @return      $seekPosition   Found next gap's seek position
-        */
-       function searchNextGap (int $length);
-
 }