| 1 |
<?php |
| 2 |
|
| 3 |
namespace League\Flysystem; |
| 4 |
|
| 5 |
interface ReadInterface |
| 6 |
{ |
| 7 |
/** |
| 8 |
* Check whether a file exists. |
| 9 |
* |
| 10 |
* @param string $path |
| 11 |
* |
| 12 |
* @return array|bool|null |
| 13 |
*/ |
| 14 |
public function has($path); |
| 15 |
|
| 16 |
/** |
| 17 |
* Read a file. |
| 18 |
* |
| 19 |
* @param string $path |
| 20 |
* |
| 21 |
* @return array|false |
| 22 |
*/ |
| 23 |
public function read($path); |
| 24 |
|
| 25 |
/** |
| 26 |
* Read a file as a stream. |
| 27 |
* |
| 28 |
* @param string $path |
| 29 |
* |
| 30 |
* @return array|false |
| 31 |
*/ |
| 32 |
public function readStream($path); |
| 33 |
|
| 34 |
/** |
| 35 |
* List contents of a directory. |
| 36 |
* |
| 37 |
* @param string $directory |
| 38 |
* @param bool $recursive |
| 39 |
* |
| 40 |
* @return array |
| 41 |
*/ |
| 42 |
public function listContents($directory = '', $recursive = false); |
| 43 |
|
| 44 |
/** |
| 45 |
* Get all the meta data of a file or directory. |
| 46 |
* |
| 47 |
* @param string $path |
| 48 |
* |
| 49 |
* @return array|false |
| 50 |
*/ |
| 51 |
public function getMetadata($path); |
| 52 |
|
| 53 |
/** |
| 54 |
* Get the size of a file. |
| 55 |
* |
| 56 |
* @param string $path |
| 57 |
* |
| 58 |
* @return array|false |
| 59 |
*/ |
| 60 |
public function getSize($path); |
| 61 |
|
| 62 |
/** |
| 63 |
* Get the mimetype of a file. |
| 64 |
* |
| 65 |
* @param string $path |
| 66 |
* |
| 67 |
* @return array|false |
| 68 |
*/ |
| 69 |
public function getMimetype($path); |
| 70 |
|
| 71 |
/** |
| 72 |
* Get the last modified time of a file as a timestamp. |
| 73 |
* |
| 74 |
* @param string $path |
| 75 |
* |
| 76 |
* @return array|false |
| 77 |
*/ |
| 78 |
public function getTimestamp($path); |
| 79 |
|
| 80 |
/** |
| 81 |
* Get the visibility of a file. |
| 82 |
* |
| 83 |
* @param string $path |
| 84 |
* |
| 85 |
* @return array|false |
| 86 |
*/ |
| 87 |
public function getVisibility($path); |
| 88 |
} |
| 89 |
|