1 | <?php |
||
9 | class Filesystem |
||
10 | { |
||
11 | /** |
||
12 | * @var FilesystemAdapterInterface |
||
13 | */ |
||
14 | protected $adapter; |
||
15 | |||
16 | /** |
||
17 | * @param FilesystemAdapterInterface $adapter |
||
18 | */ |
||
19 | public function __construct(FilesystemAdapterInterface $adapter) |
||
23 | |||
24 | /** |
||
25 | * Check whether a file exists. |
||
26 | * |
||
27 | * @param string $path |
||
28 | * |
||
29 | * @return bool |
||
30 | */ |
||
31 | public function has($path) |
||
35 | |||
36 | /** |
||
37 | * Read a file. |
||
38 | * |
||
39 | * @param string $path The path to the file. |
||
40 | * |
||
41 | * @return string|false The file contents or false on failure. |
||
42 | */ |
||
43 | public function read($path) |
||
47 | |||
48 | /** |
||
49 | * Create a file or update if exists. |
||
50 | * |
||
51 | * @param string $path The path to the file. |
||
52 | * @param string $contents The file contents. |
||
53 | * |
||
54 | * @return bool True on success, false on failure. |
||
55 | */ |
||
56 | public function put($path, $contents) |
||
60 | } |
||
61 |