1 | <?php |
||
24 | class File extends Filesystem |
||
25 | { |
||
26 | /** |
||
27 | * create the file |
||
28 | * |
||
29 | * @since 3.2.0 |
||
30 | * |
||
31 | * @param string $file name of the file |
||
32 | * @param int $mode file access mode |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | |||
37 | 2 | public function createFile(string $file = null, int $mode = 0777) : bool |
|
42 | |||
43 | /** |
||
44 | * read content of file |
||
45 | * |
||
46 | * @since 3.0.0 |
||
47 | * |
||
48 | * @param string $file name of the file |
||
49 | * |
||
50 | * @return string|null |
||
51 | */ |
||
52 | |||
53 | 2 | public function readFile(string $file = null) : ?string |
|
62 | |||
63 | /** |
||
64 | * render content of file |
||
65 | * |
||
66 | * @since 3.0.0 |
||
67 | * |
||
68 | * @param string $file name of the file |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | |||
73 | 2 | public function renderFile(string $file = null) : string |
|
83 | |||
84 | /** |
||
85 | * write content to file |
||
86 | * |
||
87 | * @since 3.0.0 |
||
88 | * |
||
89 | * @param string $file name of the file |
||
90 | * @param string $content content of the file |
||
91 | * |
||
92 | * @return bool |
||
93 | */ |
||
94 | |||
95 | 2 | public function writeFile(string $file = null, string $content = null) : bool |
|
100 | |||
101 | /** |
||
102 | * remove the file |
||
103 | * |
||
104 | * @since 3.2.0 |
||
105 | * |
||
106 | * @param string $file name of the file |
||
107 | * |
||
108 | * @return bool |
||
109 | */ |
||
110 | |||
111 | 3 | public function removeFile(string $file = null) : bool |
|
116 | } |
||
117 |