Handle mass actions for file deletion

This commit is contained in:
Dane Everitt 2020-07-11 15:37:59 -07:00
parent 82bc9e617b
commit 93cab68cc3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 147 additions and 31 deletions

View file

@ -151,10 +151,11 @@ class DaemonFileRepository extends DaemonRepository
/**
* Delete a file or folder for the server.
*
* @param string $location
* @param string|null $root
* @param array $files
* @return \Psr\Http\Message\ResponseInterface
*/
public function deleteFile(string $location): ResponseInterface
public function deleteFiles(?string $root, array $files): ResponseInterface
{
Assert::isInstanceOf($this->server, Server::class);
@ -162,7 +163,8 @@ class DaemonFileRepository extends DaemonRepository
sprintf('/api/servers/%s/files/delete', $this->server->uuid),
[
'json' => [
'location' => $location,
'root' => $root,
'files' => $files,
],
]
);