| @@ 26-39 (lines=14) @@ | ||
| 23 | ]); |
|
| 24 | } |
|
| 25 | ||
| 26 | public function move(string $path, string $newPath): array |
|
| 27 | { |
|
| 28 | $path = $this->normalizePath($path); |
|
| 29 | $newPath = $this->normalizePath($newPath); |
|
| 30 | ||
| 31 | $response = $this->client->post('files/move', [ |
|
| 32 | 'json' => [ |
|
| 33 | 'from_path' => $path, |
|
| 34 | 'to_path' => $newPath, |
|
| 35 | ] |
|
| 36 | ]); |
|
| 37 | ||
| 38 | return json_decode($response->getBody(), true); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function copy(string $path, string $newPath): array |
|
| 42 | { |
|
| @@ 41-54 (lines=14) @@ | ||
| 38 | return json_decode($response->getBody(), true); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function copy(string $path, string $newPath): array |
|
| 42 | { |
|
| 43 | $path = $this->normalizePath($path); |
|
| 44 | $newPath = $this->normalizePath($newPath); |
|
| 45 | ||
| 46 | $response = $this->client->post('files/copy', [ |
|
| 47 | 'json' => [ |
|
| 48 | 'from_path' => $path, |
|
| 49 | 'to_path' => $newPath, |
|
| 50 | ] |
|
| 51 | ]); |
|
| 52 | ||
| 53 | return json_decode($response->getBody(), true); |
|
| 54 | } |
|
| 55 | ||
| 56 | public function listContents($directory = '', $recursive = false): array |
|
| 57 | { |
|