X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffile_directories%2Fclass_BaseFile.php;h=a2a3432aa6b3f83f1d729d27bd409b72aaea7ed6;hp=bcc61661bba3d15533f1bbb5c51632daebf1dc7f;hb=6b19898fa5c1cc332e83100ea41f55073ec20a8a;hpb=f2e5c734f1b1397a95d517094152da14b136b5a1 diff --git a/inc/classes/main/file_directories/class_BaseFile.php b/inc/classes/main/file_directories/class_BaseFile.php index bcc61661..a2a3432a 100644 --- a/inc/classes/main/file_directories/class_BaseFile.php +++ b/inc/classes/main/file_directories/class_BaseFile.php @@ -51,6 +51,20 @@ class BaseFile extends BaseFrameworkSystem { parent::__destruct(); } + /** + * Initializes this file class + * + * @param $fileName Name of this abstract file + * @return void + */ + protected function initFile ($fileName) { + // Get a file i/o pointer instance + $pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class', array($fileName)); + + // ... and set it here + $this->setPointerInstance($pointerInstance); + } + /** * Close a file source and set it's instance to null and the file name * to empty @@ -84,39 +98,6 @@ class BaseFile extends BaseFrameworkSystem { public final function getFileName () { return $this->fileName; } - - /** - * Determines seek position - * - * @return $seekPosition Current seek position - * @todo 0% done - */ - public final function determineSeekPosition () { - $this->partialStub('Unfinished method.'); - } - - /** - * Seek to given offset (default) or other possibilities as fseek() gives. - * - * @param $offset Offset to seek to (or used as "base" for other seeks) - * @param $whence Added to offset (default: only use offset to seek to) - * @return $status Status of file seek: 0 = success, -1 = failed - * @todo 0% done - */ - public function seek ($offset, $whence = SEEK_SET) { - $this->partialStub('Unfinished method.'); - } - - /** - * Size of this file - * - * @return $size Size (in bytes) of file - * @todo Handle seekStatus - * @todo 0% done - */ - public function size () { - $this->partialStub('Unfinished method.'); - } } // [EOF]