]> git.mxchange.org Git - core.git/blobdiff - framework/main/exceptions/file_directory/class_FileWriteProtectedException.php
Continued:
[core.git] / framework / main / exceptions / file_directory / class_FileWriteProtectedException.php
index 246573d52cbf2f10806bc56abe5548314e9495c3..3961d559c33e305a7f4e285ec6ede04320ca51c5 100644 (file)
@@ -1,9 +1,12 @@
 <?php
 // Own namespace
-namespace CoreFramework\Deprecated;
+namespace Org\Mxchange\CoreFramework\FileSystem;
 
 // Import framework stuff
-use CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkException;
+
+// Import SPL stuff
+use \SplFileInfo;
 
 /**
  * An exception thrown when a file could not be written.
@@ -13,8 +16,7 @@ use CoreFramework\Generic\FrameworkException;
  * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
- * @deprecated Don't use this anymore
- * 
+ *
  * 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
@@ -32,13 +34,13 @@ class FileWriteProtectedException extends FrameworkException {
        /**
         * The constructor
         *
-        * @param       $fqfn   Full-qualified file name of (maybe) missing file
+        * @param       $infoInstance   An instance of a SplFileInfo class
         * @param       $code   Code number for the exception
         * @return      void
         */
-       public function __construct ($fqfn, $code) {
+       public function __construct (SplFileInfo $infoInstance, $code) {
                // Add a message around the missing class
-               $message = sprintf('File %s cannot be written. Please check file and/or directory permissions.', $fqfn);
+               $message = sprintf('File %s cannot be written. Please check file and/or directory permissions.', $infoInstance->getPathname());
 
                // Call parent constructor
                parent::__construct($message, $code);