X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fiterator%2Fio%2Fclass_FileIoIterator.php;fp=inc%2Fclasses%2Fmain%2Fiterator%2Fio%2Fclass_FileIoIterator.php;h=f2158c63eaf94a790caed9ebbb7ab3a08cc3ce4b;hp=20d351f5e694d09b43376e8d1badc8b6f7368dfa;hb=0af07e30d2e346b21cbb57b53c7550ce93baac06;hpb=4af01023fc4b9ffc4c7174264dbff53966aecc91 diff --git a/inc/classes/main/iterator/io/class_FileIoIterator.php b/inc/classes/main/iterator/io/class_FileIoIterator.php index 20d351f5..f2158c63 100644 --- a/inc/classes/main/iterator/io/class_FileIoIterator.php +++ b/inc/classes/main/iterator/io/class_FileIoIterator.php @@ -134,6 +134,7 @@ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterato * Advances to next "block" of bytes * * @return void + * @todo This method will load large but empty files in a whole */ public function next () { // Is there nothing to read? @@ -282,6 +283,18 @@ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterato // Call pointer instance return $this->getPointerInstance()->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 + */ + public function analyzeFile () { + // Just call the pointer instance + $this->getPointerInstance()->analyzeFile(); + } } // [EOF]