1 | <?php |
||
22 | final class FlySystemFile implements File |
||
23 | { |
||
24 | /** @var FilesystemInterface */ |
||
25 | private $fileSystem; |
||
26 | |||
27 | /** @var string */ |
||
28 | private $fileName; |
||
29 | |||
30 | 3 | public function __construct(FilesystemInterface $fileSystem, string $fileName) |
|
35 | |||
36 | /** |
||
37 | * Returns the content of the file as a string. |
||
38 | * |
||
39 | * @throws FileNotFoundException |
||
40 | */ |
||
41 | 1 | public function getContents(): string |
|
45 | |||
46 | /** |
||
47 | * Returns md5 hash of the file. |
||
48 | * |
||
49 | * @throws FileNotFoundException |
||
50 | */ |
||
51 | 1 | public function md5(): string |
|
55 | |||
56 | /** |
||
57 | * Returns an relative path to the file. |
||
58 | */ |
||
59 | 1 | public function path(): string |
|
63 | } |
||
64 |