ArrayUtil.php
3 years ago
Config.php
3 years ago
ConfigCollection.php
3 years ago
ConfigCollectionFactory.php
3 years ago
ConfigCollectionInterface.php
3 years ago
ConfigFactory.php
3 years ago
ConfigInterface.php
3 years ago
Filesystem.php
3 years ago
FilesystemInterface.php
3 years ago
Imposter.php
3 years ago
ImposterFactory.php
3 years ago
ImposterInterface.php
3 years ago
ProjectConfig.php
3 years ago
ProjectConfigInterface.php
3 years ago
StringUtil.php
3 years ago
Transformer.php
3 years ago
TransformerInterface.php
3 years ago
FilesystemInterface.php
62 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace TypistTech\Imposter; |
| 6 | |
| 7 | interface FilesystemInterface |
| 8 | { |
| 9 | /** |
| 10 | * @param string $path |
| 11 | * |
| 12 | * @return \SplFileInfo[] |
| 13 | */ |
| 14 | public function allFiles(string $path): array; |
| 15 | |
| 16 | /** |
| 17 | * Extract the parent directory from a file path. |
| 18 | * |
| 19 | * @param string $path |
| 20 | * |
| 21 | * @return string |
| 22 | */ |
| 23 | public function dirname(string $path): string; |
| 24 | |
| 25 | /** |
| 26 | * Get the contents of a file. |
| 27 | * |
| 28 | * @param string $path |
| 29 | * |
| 30 | * @return string |
| 31 | */ |
| 32 | public function get(string $path): string; |
| 33 | |
| 34 | /** |
| 35 | * Determine if the given path is a file. |
| 36 | * |
| 37 | * @param string $path |
| 38 | * |
| 39 | * @return bool |
| 40 | */ |
| 41 | public function isFile(string $path): bool; |
| 42 | |
| 43 | /** |
| 44 | * Determine if the given path is a directory. |
| 45 | * |
| 46 | * @param string $path |
| 47 | * |
| 48 | * @return bool |
| 49 | */ |
| 50 | public function isDir(string $path); |
| 51 | |
| 52 | /** |
| 53 | * Write the contents of a file. |
| 54 | * |
| 55 | * @param string $path |
| 56 | * @param string $contents |
| 57 | * |
| 58 | * @return mixed |
| 59 | */ |
| 60 | public function put(string $path, string $contents); |
| 61 | } |
| 62 |