1<?php 2 3namespace League\Flysystem; 4 5use RuntimeException; 6use SplFileInfo; 7 8class NotSupportedException extends RuntimeException 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