projects
/
core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewritten:
[core.git]
/
framework
/
main
/
exceptions
/
file_directory
/
class_FileReadProtectedException.php
diff --git
a/framework/main/exceptions/file_directory/class_FileReadProtectedException.php
b/framework/main/exceptions/file_directory/class_FileReadProtectedException.php
index 7be7ba632f9d35fbf8c27b960f2cb5965f1e2dbb..039e1bd382c33cf02d1c0182457cd9ce0ac46e23 100644
(file)
--- a/
framework/main/exceptions/file_directory/class_FileReadProtectedException.php
+++ b/
framework/main/exceptions/file_directory/class_FileReadProtectedException.php
@@
-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 is read-protected
*
/**
* An exception thrown when a file is read-protected
*
@@
-31,13
+34,13
@@
class FileReadProtectedException extends FrameworkException {
/**
* The constructor
*
/**
* The constructor
*
- * @param $
fileName File which cannot be read from
+ * @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 (
$fileNam
e, $code) {
+ public function __construct (
SplFileInfo $infoInstanc
e, $code) {
// Add a message around the missing class
// Add a message around the missing class
- $message = sprintf('File %s is read-protected. Please set read access rights (CHMOD).', $
fileName
);
+ $message = sprintf('File %s is read-protected. Please set read access rights (CHMOD).', $
infoInstance->getPathname()
);
// Call parent constructor
parent::__construct($message, $code);
// Call parent constructor
parent::__construct($message, $code);