X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fexceptions%2Ffile_directory%2Fclass_FileWriteProtectedException.php;h=a0de7316627d65746027ed26402952311d7195c4;hp=71edcf01a45a6ae374d0113f53ea6d4c5e2ef34d;hb=b9bfbe86c031c9d83c3670602906df191a33ba2a;hpb=5da8f717122568335b8a8ab230fa0de17e983fab diff --git a/framework/main/exceptions/file_directory/class_FileWriteProtectedException.php b/framework/main/exceptions/file_directory/class_FileWriteProtectedException.php index 71edcf01..a0de7316 100644 --- a/framework/main/exceptions/file_directory/class_FileWriteProtectedException.php +++ b/framework/main/exceptions/file_directory/class_FileWriteProtectedException.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 could not be written. * @@ -31,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);