Rewritten:
[core.git] / framework / main / exceptions / file_directory / class_PathWriteProtectedException.php
index 13ae3da44d38aec0c0e6fbc34f47ebbe18815554..2e4da8391e648764b81c73a707dfe23af9e5c8cd 100644 (file)
@@ -6,6 +6,9 @@ namespace CoreFramework\Filesystem;
 use CoreFramework\Filesystem\PathWriteProtectedException;
 use CoreFramework\Generic\FrameworkException;
 
 use CoreFramework\Filesystem\PathWriteProtectedException;
 use CoreFramework\Generic\FrameworkException;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * An exception thrown when a path cannot be written to.
  *
 /**
  * An exception thrown when a path cannot be written to.
  *
@@ -32,13 +35,13 @@ class PathWriteProtectedException extends FrameworkException {
        /**
         * The constructor
         *
        /**
         * The constructor
         *
-        * @param       $fqfn   Full-qualified file name
+        * @param       $infoInstance   An instance of a SplFileInfo class
         * @param       $code   Code number for the exception
         * @return      void
         */
         * @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
                // Add a message around the missing class
-               $message = sprintf('Path %s cannot be written to. Please check permissions.', dirname($fqfn));
+               $message = sprintf('Path "%s" cannot be written to. Please check permissions.', $infoInstance->getPath());
 
                // Call parent constructor
                parent::__construct($message, $code);
 
                // Call parent constructor
                parent::__construct($message, $code);