1 | <?php |
||
16 | class Filesystem |
||
17 | { |
||
18 | /** |
||
19 | * Wraps the php mkdir() function, but defaults to recursive directory creation |
||
20 | * |
||
21 | * @param string $pathname |
||
22 | * @param int $mode |
||
23 | * @param bool $recursive |
||
24 | * @return bool |
||
25 | */ |
||
26 | 3 | public function makeDirectory(string $pathname, int $mode = 0777, bool $recursive = true): bool |
|
30 | |||
31 | /** |
||
32 | * Write contents to file |
||
33 | * |
||
34 | * @param string $filename |
||
35 | * @param string $contents |
||
36 | * @return bool |
||
37 | */ |
||
38 | 2 | public function put(string $filename, string $contents): bool |
|
44 | } |
||
45 |