]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php
Continued:
[core.git] / framework / main / classes / file_directories / io / class_FrameworkFileInputOutputPointer.php
index 556942db47454f20c28a4b1903d218de7cbdf9ce..1217e83a4bcd63be9ad7f935f318ea820d13a32e 100644 (file)
@@ -67,12 +67,12 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
                } elseif ((!FrameworkBootstrap::isReadableFile($fileInstance)) && (file_exists($fileInstance))) {
                        // File exists but cannot be read
                        throw new FileReadProtectedException($fileInstance, self::EXCEPTION_FILE_CANNOT_BE_READ);
-               } elseif (($fileInstance->isFile()) && (!$fileInstance->isWritable())) {
-                       // File exists but cannot be written
-                       throw new FileWriteProtectedException($fileInstance, self::EXCEPTION_FILE_CANNOT_BE_WRITTEN);
                } elseif (!is_writable($fileInstance->getPath())) {
                        // Path is not writable
                        throw new PathWriteProtectedException($fileInstance, self::EXCEPTION_PATH_CANNOT_BE_WRITTEN);
+               } elseif (($fileInstance->isFile()) && (!$fileInstance->isWritable())) {
+                       // File exists but cannot be written
+                       throw new FileWriteProtectedException($fileInstance, self::EXCEPTION_FILE_CANNOT_BE_WRITTEN);
                }
 
                // Try to open a handler
@@ -102,7 +102,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
         *
         * @return      void
         * @throws      NullPointerException    If the file pointer instance
-        *                                                                      is not set by setPointer()
+        *                                                                      is not set by setFileObject()
         * @todo Add more checks
         */
        private function validateFilePointer () {