From: Roland Haeder Date: Thu, 15 May 2014 19:35:09 +0000 (+0200) Subject: Continued with loader and file i/o stuff: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=6327d67d057b505a33549c656310ee1f9ed1cffa Continued with loader and file i/o stuff: - renamed interface to SeekableWritableFileIterator as this interface allows write operations (such calls are forwarded to the wrapped file_raw_input_output_pointer_class instance). - Removed .svn from excepted paths as this won't be the case. Signed-off-by: Roland Häder --- diff --git a/inc/classes/interfaces/iterator/class_SeekableFileIterator.php b/inc/classes/interfaces/iterator/class_SeekableFileIterator.php deleted file mode 100644 index 1192192b..00000000 --- a/inc/classes/interfaces/iterator/class_SeekableFileIterator.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -interface SeekableFileIterator extends SeekableIterator { -} - -// [EOF] -?> diff --git a/inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php b/inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php new file mode 100644 index 00000000..48dd8db4 --- /dev/null +++ b/inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php @@ -0,0 +1,36 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +interface SeekableWritableFileIterator extends SeekableIterator { + /** + * Seeks to given position + * + * @param $seekPosition Seek position in file + * @return void + */ + function seek ($seedPosition); +} + +// [EOF] +?> diff --git a/inc/classes/main/iterator/io/class_FileIoIterator.php b/inc/classes/main/iterator/io/class_FileIoIterator.php index 1791e615..cfd1297b 100644 --- a/inc/classes/main/iterator/io/class_FileIoIterator.php +++ b/inc/classes/main/iterator/io/class_FileIoIterator.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class FileIoIterator extends BaseIterator implements SeekableFileIterator { +class FileIoIterator extends BaseIterator implements SeekableWritableFileIterator { /** * Protected constructor * diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index eea55805..af4d8d33 100644 --- a/inc/loader/class_ClassLoader.php +++ b/inc/loader/class_ClassLoader.php @@ -305,7 +305,6 @@ class ClassLoader { array_push($ignoreList, '.'); array_push($ignoreList, '..'); array_push($ignoreList, '.htaccess'); - array_push($ignoreList, '.svn'); // Keep it in class for later usage $this->ignoreList = $ignoreList; @@ -320,7 +319,7 @@ class ClassLoader { // If the basePath is FALSE it is invalid if ($basePath2 === FALSE) { /* @todo: Do not die here. */ - exit(__METHOD__ . ':Cannot read ' . $basePath . ' !'); + exit(__METHOD__ . ':Cannot read ' . $basePath . ' !' . PHP_EOL); } else { // Set base path $basePath = $basePath2;