-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
594 additions
and
453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Psl\Filesystem\Exception; | ||
|
||
use Psl\Exception; | ||
|
||
class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Psl\Filesystem\Exception; | ||
|
||
use Psl\Str; | ||
|
||
final class NotDirectoryException extends InvalidArgumentException | ||
{ | ||
public static function for(string $path): NotDirectoryException | ||
{ | ||
return new self(Str\format('Path "%s" does not point to a directory.', $path)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Psl\Filesystem\Exception; | ||
|
||
use Psl\Str; | ||
|
||
final class NotFileException extends InvalidArgumentException | ||
{ | ||
public static function for(string $path): NotFileException | ||
{ | ||
return new self(Str\format('Path "%s" does not point to a file.', $path)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Psl\Filesystem\Exception; | ||
|
||
use Psl\Str; | ||
|
||
final class NotFoundException extends InvalidArgumentException | ||
{ | ||
public static function forNode(string $node): NotFoundException | ||
{ | ||
return new self(Str\format('Node "%s" is not found.', $node)); | ||
} | ||
|
||
public static function forFile(string $file): NotFoundException | ||
{ | ||
return new self(Str\format('File "%s" is not found.', $file)); | ||
} | ||
|
||
public static function forDirectory(string $directory): NotFoundException | ||
{ | ||
return new self(Str\format('Directory "%s" is not found.', $directory)); | ||
} | ||
|
||
public static function forSymbolicLink(string $symbolic_link): NotFoundException | ||
{ | ||
return new self(Str\format('Symbolic link "%s" is not found.', $symbolic_link)); | ||
} | ||
|
||
public static function forLink(string $link): NotFoundException | ||
{ | ||
return new self(Str\format('Link "%s" is not found.', $link)); | ||
} | ||
} |
Oops, something went wrong.