// Import framework stuff
use CoreFramework\Generic\FrameworkException;
+// Import SPL stuff
+use \SplFileInfo;
+
/**
* An exception thrown when a file is read-protected
*
/**
* 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
*/
- public function __construct ($fileName, $code) {
+ public function __construct (SplFileInfo $infoInstance, $code) {
// 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);