X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fexceptions%2Ffile_directory%2Fclass_FileIoException.php;h=573c9099d45c2986728a58ddc4c1c0fbfe8c773c;hp=a445dd7842c56c09127cdf7d643ec8b47c5bf451;hb=b9bfbe86c031c9d83c3670602906df191a33ba2a;hpb=5da8f717122568335b8a8ab230fa0de17e983fab diff --git a/framework/main/exceptions/file_directory/class_FileIoException.php b/framework/main/exceptions/file_directory/class_FileIoException.php index a445dd78..573c9099 100644 --- a/framework/main/exceptions/file_directory/class_FileIoException.php +++ b/framework/main/exceptions/file_directory/class_FileIoException.php @@ -5,6 +5,9 @@ namespace CoreFramework\Filesystem; // 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. @@ -32,13 +35,13 @@ class FileIoException 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('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);