UnableToCheckFileExistence.php 548 B

123456789101112131415161718192021
  1. <?php
  2. declare(strict_types=1);
  3. namespace League\Flysystem;
  4. use RuntimeException;
  5. use Throwable;
  6. class UnableToCheckFileExistence extends RuntimeException implements FilesystemOperationFailed
  7. {
  8. public static function forLocation(string $path, Throwable $exception = null): UnableToCheckFileExistence
  9. {
  10. return new UnableToCheckFileExistence("Unable to check file existence for: ${path}", 0, $exception);
  11. }
  12. public function operation(): string
  13. {
  14. return FilesystemOperationFailed::OPERATION_FILE_EXISTS;
  15. }
  16. }