| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace League\Flysystem; |
| 6 |
|
| 7 |
use RuntimeException; |
| 8 |
use Throwable; |
| 9 |
|
| 10 |
class UnableToCheckExistence extends RuntimeException implements FilesystemOperationFailed |
| 11 |
{ |
| 12 |
final public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) |
| 13 |
{ |
| 14 |
parent::__construct($message, $code, $previous); |
| 15 |
} |
| 16 |
|
| 17 |
public static function forLocation(string $path, ?Throwable $exception = null): static |
| 18 |
{ |
| 19 |
return new static("Unable to check existence for: {$path}", 0, $exception); |
| 20 |
} |
| 21 |
|
| 22 |
public function operation(): string |
| 23 |
{ |
| 24 |
return FilesystemOperationFailed::OPERATION_EXISTENCE_CHECK; |
| 25 |
} |
| 26 |
} |
| 27 |
|