fix: File Exception.php not found
This commit is contained in:
4
src/Utils/FileSystem/Exception/BadEnvException.php
Normal file
4
src/Utils/FileSystem/Exception/BadEnvException.php
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
namespace Bsr\Utils\FileSystem\Exception;
|
||||||
|
|
||||||
|
class BadEnvException extends \Exception {}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Bsr\Utils\FileSystem;
|
namespace Bsr\Utils\FileSystem;
|
||||||
|
|
||||||
|
use Bsr\Utils\FileSystem\Exception\BadEnvException;
|
||||||
|
|
||||||
class FileSystem
|
class FileSystem
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -24,7 +26,7 @@ class FileSystem
|
|||||||
if (!file_exists($buildPath . "/$part")) {
|
if (!file_exists($buildPath . "/$part")) {
|
||||||
if (!is_writable($buildPath)) {
|
if (!is_writable($buildPath)) {
|
||||||
if ($throw) {
|
if ($throw) {
|
||||||
throw new Exception("Attempting to create : $path, but $buildPath is not writeable.");
|
throw new BadEnvException("Attempting to create : $path, but $buildPath is not writeable.");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user