@@ -42,162 +42,162 @@ |
||
42 | 42 | const VISIBILITY_PRIVATE = 'private'; |
43 | 43 | |
44 | 44 | /** |
45 | - * Append given data string to this file. |
|
46 | - * |
|
47 | - * @param string $path |
|
48 | - * @param string $data |
|
49 | - * |
|
50 | - * @return bool |
|
51 | - */ |
|
52 | - public function append($path, $data); |
|
53 | - |
|
54 | - /** |
|
55 | - * Copy a file to a new location. |
|
56 | - * |
|
57 | - * @param string $path |
|
58 | - * @param string $target |
|
59 | - * |
|
60 | - * @return bool |
|
61 | - */ |
|
62 | - public function copy($path, $target): bool; |
|
63 | - |
|
64 | - /** |
|
65 | - * Get the contents of a file. |
|
66 | - * |
|
67 | - * @param string $path |
|
68 | - * @param bool $lock |
|
69 | - * @param bool $force |
|
70 | - * |
|
71 | - * @return string |
|
72 | - * |
|
73 | - * @throws FileNotFoundException |
|
74 | - */ |
|
75 | - public function get($path, $lock = false, $force = false): string; |
|
76 | - |
|
77 | - /** |
|
78 | - * Get contents of a file with shared access. |
|
79 | - * |
|
80 | - * @param string $path |
|
81 | - * @param bool $force |
|
82 | - * |
|
83 | - * @return string |
|
84 | - */ |
|
85 | - public function read($path, $force = false): string; |
|
86 | - |
|
87 | - /** |
|
88 | - * Creates the file. |
|
89 | - * |
|
90 | - * @param string $path |
|
91 | - * |
|
92 | - * @return bool |
|
93 | - */ |
|
94 | - public function create($path): bool; |
|
95 | - |
|
96 | - /** |
|
97 | - * Determine if a file exists. |
|
98 | - * |
|
99 | - * @param string $path |
|
100 | - * |
|
101 | - * @return bool |
|
102 | - */ |
|
103 | - public function exists($path): bool; |
|
104 | - |
|
105 | - /** |
|
106 | - * Retrieve the file size. |
|
107 | - * |
|
108 | - * Implementations SHOULD return the value stored in the "size" key of |
|
109 | - * the file in the $_FILES array if available, as PHP calculates this |
|
110 | - * based on the actual size transmitted. |
|
111 | - * |
|
112 | - * @param string $path |
|
113 | - * @param string $unit |
|
114 | - * |
|
115 | - * @return int|null The file size in bytes or null if unknown |
|
116 | - */ |
|
117 | - public function size($path, $unit = 'b'): int|null; |
|
118 | - |
|
119 | - /** |
|
120 | - * Get all of the directories within a given directory. |
|
121 | - * |
|
122 | - * @param string $directory |
|
123 | - * |
|
124 | - * @return array |
|
125 | - */ |
|
126 | - public function directories($directory): array; |
|
127 | - |
|
128 | - /** |
|
129 | - * Delete the file at a given path. |
|
130 | - * |
|
131 | - * @param string $paths |
|
132 | - * |
|
133 | - * @return bool |
|
134 | - */ |
|
135 | - public function delete($paths): bool; |
|
136 | - |
|
137 | - /** |
|
138 | - * Create a directory. |
|
139 | - * |
|
140 | - * @param string $path |
|
141 | - * @param int $mode |
|
142 | - * @param bool $recursive |
|
143 | - * @param bool $force |
|
144 | - * |
|
145 | - * @return bool |
|
146 | - * |
|
147 | - * @throws FileException |
|
148 | - */ |
|
149 | - public function makeDirectory($path, $mode = 0755, $recursive = false, $force = false): bool; |
|
150 | - |
|
151 | - /** |
|
152 | - * Recursively delete a directory and optionally you can keep |
|
153 | - * the directory if you wish. |
|
154 | - * |
|
155 | - * @param string $directory |
|
156 | - * @param bool $keep |
|
157 | - * |
|
158 | - * @return bool |
|
159 | - */ |
|
160 | - public function deleteDirectory($directory, $keep = false): bool; |
|
161 | - |
|
162 | - /** |
|
163 | - * Move a file to a new location. |
|
164 | - * |
|
165 | - * @param string $path |
|
166 | - * @param string $target |
|
167 | - * |
|
168 | - * @return bool |
|
169 | - */ |
|
170 | - public function move($path, $target): bool; |
|
171 | - |
|
172 | - /** |
|
173 | - * Prepend to a file. |
|
174 | - * |
|
175 | - * @param string $path |
|
176 | - * @param string $data |
|
177 | - * |
|
178 | - * @return int |
|
179 | - */ |
|
180 | - public function prepend($path, $data): int; |
|
181 | - |
|
182 | - /** |
|
183 | - * Write the content of a file. |
|
184 | - * |
|
185 | - * @param string $path |
|
186 | - * @param string $contents |
|
187 | - * @param bool $lock |
|
188 | - * |
|
189 | - * @return int|bool |
|
190 | - */ |
|
191 | - public function put($path, $contents, $lock = false): int|bool; |
|
192 | - |
|
193 | - /** |
|
194 | - * Write given data to this file. |
|
195 | - * |
|
196 | - * @param string $path |
|
197 | - * @param string $data Data to write to this File |
|
198 | - * @param bool $force The file to open |
|
199 | - * |
|
200 | - * @return bool |
|
201 | - */ |
|
202 | - public function write($path, $data, $force = false): bool; |
|
45 | + * Append given data string to this file. |
|
46 | + * |
|
47 | + * @param string $path |
|
48 | + * @param string $data |
|
49 | + * |
|
50 | + * @return bool |
|
51 | + */ |
|
52 | + public function append($path, $data); |
|
53 | + |
|
54 | + /** |
|
55 | + * Copy a file to a new location. |
|
56 | + * |
|
57 | + * @param string $path |
|
58 | + * @param string $target |
|
59 | + * |
|
60 | + * @return bool |
|
61 | + */ |
|
62 | + public function copy($path, $target): bool; |
|
63 | + |
|
64 | + /** |
|
65 | + * Get the contents of a file. |
|
66 | + * |
|
67 | + * @param string $path |
|
68 | + * @param bool $lock |
|
69 | + * @param bool $force |
|
70 | + * |
|
71 | + * @return string |
|
72 | + * |
|
73 | + * @throws FileNotFoundException |
|
74 | + */ |
|
75 | + public function get($path, $lock = false, $force = false): string; |
|
76 | + |
|
77 | + /** |
|
78 | + * Get contents of a file with shared access. |
|
79 | + * |
|
80 | + * @param string $path |
|
81 | + * @param bool $force |
|
82 | + * |
|
83 | + * @return string |
|
84 | + */ |
|
85 | + public function read($path, $force = false): string; |
|
86 | + |
|
87 | + /** |
|
88 | + * Creates the file. |
|
89 | + * |
|
90 | + * @param string $path |
|
91 | + * |
|
92 | + * @return bool |
|
93 | + */ |
|
94 | + public function create($path): bool; |
|
95 | + |
|
96 | + /** |
|
97 | + * Determine if a file exists. |
|
98 | + * |
|
99 | + * @param string $path |
|
100 | + * |
|
101 | + * @return bool |
|
102 | + */ |
|
103 | + public function exists($path): bool; |
|
104 | + |
|
105 | + /** |
|
106 | + * Retrieve the file size. |
|
107 | + * |
|
108 | + * Implementations SHOULD return the value stored in the "size" key of |
|
109 | + * the file in the $_FILES array if available, as PHP calculates this |
|
110 | + * based on the actual size transmitted. |
|
111 | + * |
|
112 | + * @param string $path |
|
113 | + * @param string $unit |
|
114 | + * |
|
115 | + * @return int|null The file size in bytes or null if unknown |
|
116 | + */ |
|
117 | + public function size($path, $unit = 'b'): int|null; |
|
118 | + |
|
119 | + /** |
|
120 | + * Get all of the directories within a given directory. |
|
121 | + * |
|
122 | + * @param string $directory |
|
123 | + * |
|
124 | + * @return array |
|
125 | + */ |
|
126 | + public function directories($directory): array; |
|
127 | + |
|
128 | + /** |
|
129 | + * Delete the file at a given path. |
|
130 | + * |
|
131 | + * @param string $paths |
|
132 | + * |
|
133 | + * @return bool |
|
134 | + */ |
|
135 | + public function delete($paths): bool; |
|
136 | + |
|
137 | + /** |
|
138 | + * Create a directory. |
|
139 | + * |
|
140 | + * @param string $path |
|
141 | + * @param int $mode |
|
142 | + * @param bool $recursive |
|
143 | + * @param bool $force |
|
144 | + * |
|
145 | + * @return bool |
|
146 | + * |
|
147 | + * @throws FileException |
|
148 | + */ |
|
149 | + public function makeDirectory($path, $mode = 0755, $recursive = false, $force = false): bool; |
|
150 | + |
|
151 | + /** |
|
152 | + * Recursively delete a directory and optionally you can keep |
|
153 | + * the directory if you wish. |
|
154 | + * |
|
155 | + * @param string $directory |
|
156 | + * @param bool $keep |
|
157 | + * |
|
158 | + * @return bool |
|
159 | + */ |
|
160 | + public function deleteDirectory($directory, $keep = false): bool; |
|
161 | + |
|
162 | + /** |
|
163 | + * Move a file to a new location. |
|
164 | + * |
|
165 | + * @param string $path |
|
166 | + * @param string $target |
|
167 | + * |
|
168 | + * @return bool |
|
169 | + */ |
|
170 | + public function move($path, $target): bool; |
|
171 | + |
|
172 | + /** |
|
173 | + * Prepend to a file. |
|
174 | + * |
|
175 | + * @param string $path |
|
176 | + * @param string $data |
|
177 | + * |
|
178 | + * @return int |
|
179 | + */ |
|
180 | + public function prepend($path, $data): int; |
|
181 | + |
|
182 | + /** |
|
183 | + * Write the content of a file. |
|
184 | + * |
|
185 | + * @param string $path |
|
186 | + * @param string $contents |
|
187 | + * @param bool $lock |
|
188 | + * |
|
189 | + * @return int|bool |
|
190 | + */ |
|
191 | + public function put($path, $contents, $lock = false): int|bool; |
|
192 | + |
|
193 | + /** |
|
194 | + * Write given data to this file. |
|
195 | + * |
|
196 | + * @param string $path |
|
197 | + * @param string $data Data to write to this File |
|
198 | + * @param bool $force The file to open |
|
199 | + * |
|
200 | + * @return bool |
|
201 | + */ |
|
202 | + public function write($path, $data, $force = false): bool; |
|
203 | 203 | } |
204 | 204 | \ No newline at end of file |