* @return $current Currently read data
*/
public function current () {
- // Default is null
- $current = null;
-
- $this->partialStub('Please implement this method.');
-
- // Return it
- return $current;
+ // Call pointer instance
+ return $this->getPointerInstance()->current();
}
/**
* @return void
*/
public function next () {
- $this->partialStub('Please implement this method.');
+ // Call pointer instance
+ $this->getPointerInstance()->next();
}
/**
* 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.
*
- * @return void
+ * @return $isValid Whether the next entry is valid
*/
public function valid () {
- $this->partialStub('Please implement this method.');
+ // Call pointer instance
+ return $this->getPointerInstance()->valid();
}
/**
// 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();
+ }
+
+ /**
+ * Checks whether the file header is initialized
+ *
+ * @return $isInitialized Whether the file header is initialized
+ */
+ public function isFileHeaderInitialized () {
+ // Just call the pointer instance
+ return $this->getPointerInstance()->isFileHeaderInitialized();
+ }
+
+ /**
+ * Creates the assigned file
+ *
+ * @return void
+ */
+ public function createFileHeader () {
+ // Just call the pointer instance
+ $this->getPointerInstance()->createFileHeader();
+ }
+
+ /**
+ * Pre-allocates file (if enabled) with some space for later faster write access.
+ *
+ * @param $type Type of the file
+ * @return void
+ */
+ public function preAllocateFile ($type) {
+ // Just call the pointer instance
+ $this->getPointerInstance()->preAllocateFile($type);
+ }
}
// [EOF]