Rewritten:
[core.git] / framework / main / exceptions / file_directory / class_FileIoException.php
index a445dd7842c56c09127cdf7d643ec8b47c5bf451..573c9099d45c2986728a58ddc4c1c0fbfe8c773c 100644 (file)
@@ -5,6 +5,9 @@ namespace CoreFramework\Filesystem;
 // Import framework stuff
 use CoreFramework\Generic\FrameworkException;
 
 // Import framework stuff
 use CoreFramework\Generic\FrameworkException;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * An exception thrown when a file pointer is not opened or when the file
  * cannot be reached.
 /**
  * An exception thrown when a file pointer is not opened or when the file
  * cannot be reached.
@@ -32,13 +35,13 @@ class FileIoException extends FrameworkException {
        /**
         * The constructor
         *
        /**
         * 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
         */
         * @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('A problem has been detected reading or writing to/from %s.', $fqfn);
+               $message = sprintf('A problem has been detected reading or writing to/from %s.', $infoInstance->getPathname());
 
                // Call parent constructor
                parent::__construct($message, $code);
 
                // Call parent constructor
                parent::__construct($message, $code);