| 1 |
<?php |
| 2 |
|
| 3 |
namespace League\Flysystem; |
| 4 |
|
| 5 |
use RuntimeException; |
| 6 |
use SplFileInfo; |
| 7 |
|
| 8 |
class NotSupportedException extends RuntimeException implements FilesystemException |
| 9 |
{ |
| 10 |
/** |
| 11 |
* Create a new exception for a link. |
| 12 |
* |
| 13 |
* @param SplFileInfo $file |
| 14 |
* |
| 15 |
* @return static |
| 16 |
*/ |
| 17 |
public static function forLink(SplFileInfo $file) |
| 18 |
{ |
| 19 |
$message = 'Links are not supported, encountered link at '; |
| 20 |
|
| 21 |
return new static($message . $file->getPathname()); |
| 22 |
} |
| 23 |
|
| 24 |
/** |
| 25 |
* Create a new exception for a link. |
| 26 |
* |
| 27 |
* @param string $systemType |
| 28 |
* |
| 29 |
* @return static |
| 30 |
*/ |
| 31 |
public static function forFtpSystemType($systemType) |
| 32 |
{ |
| 33 |
$message = "The FTP system type '$systemType' is currently not supported."; |
| 34 |
|
| 35 |
return new static($message); |
| 36 |
} |
| 37 |
} |
| 38 |
|