PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / vendor / typisttech / imposter / src / FilesystemInterface.php

FilesystemInterface.php in Code Snippets 4.0.0-beta.2, at vendor/typisttech/imposter/src/FilesystemInterface.php

62 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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