@@ 183-192 (lines=10) @@ | ||
180 | * |
|
181 | * @return bool |
|
182 | */ |
|
183 | public function rename($path, $newpath) |
|
184 | { |
|
185 | $connection = $this->getConnection(); |
|
186 | ||
187 | $result = $connection->exec([ |
|
188 | CURLOPT_POSTQUOTE => ['RNFR ' . $path, 'RNTO ' . $newpath], |
|
189 | ]); |
|
190 | ||
191 | return $result !== false; |
|
192 | } |
|
193 | ||
194 | /** |
|
195 | * Copy a file. |
|
@@ 220-229 (lines=10) @@ | ||
217 | * |
|
218 | * @return bool |
|
219 | */ |
|
220 | public function delete($path) |
|
221 | { |
|
222 | $connection = $this->getConnection(); |
|
223 | ||
224 | $result = $connection->exec([ |
|
225 | CURLOPT_POSTQUOTE => ['DELE ' . $path], |
|
226 | ]); |
|
227 | ||
228 | return $result !== false; |
|
229 | } |
|
230 | ||
231 | /** |
|
232 | * Delete a directory. |
|
@@ 238-247 (lines=10) @@ | ||
235 | * |
|
236 | * @return bool |
|
237 | */ |
|
238 | public function deleteDir($dirname) |
|
239 | { |
|
240 | $connection = $this->getConnection(); |
|
241 | ||
242 | $result = $connection->exec([ |
|
243 | CURLOPT_POSTQUOTE => ['RMD ' . $dirname], |
|
244 | ]); |
|
245 | ||
246 | return $result !== false; |
|
247 | } |
|
248 | ||
249 | /** |
|
250 | * Create a directory. |