| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
declare(strict_types=1);
|
|
|
4 |
|
|
|
5 |
namespace League\Flysystem;
|
|
|
6 |
|
|
|
7 |
use RuntimeException;
|
|
|
8 |
use Throwable;
|
|
|
9 |
|
|
|
10 |
final class UnableToListContents extends RuntimeException implements FilesystemOperationFailed
|
|
|
11 |
{
|
|
|
12 |
public static function atLocation(string $location, bool $deep, Throwable $previous): UnableToListContents
|
|
|
13 |
{
|
|
|
14 |
$message = "Unable to list contents for '$location', " . ($deep ? 'deep' : 'shallow') . " listing\n\n"
|
|
|
15 |
. 'Reason: ' . $previous->getMessage();
|
|
|
16 |
|
|
|
17 |
return new UnableToListContents($message, 0, $previous);
|
|
|
18 |
}
|
|
|
19 |
|
|
|
20 |
public function operation(): string
|
|
|
21 |
{
|
|
|
22 |
return self::OPERATION_LIST_CONTENTS;
|
|
|
23 |
}
|
|
|
24 |
}
|