Skip to content

Commit

Permalink
Merge pull request #2 from carollinggo/patch-2
Browse files Browse the repository at this point in the history
Update Files.php
  • Loading branch information
arcphysx authored Sep 2, 2021
2 parents 322901e + 9baf78c commit b6d5542
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Modules/Singleton/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,17 @@ public function copy($fileId, $destinationId, $name = null)

return ResponseWrapper::parse($response);
}

public function rename($fileId, $name)
{
$body = [
'json' => [
'name' => $name,
],
];

$response = Laradrive::httpClient()->patch("files/$fileId", $body);

return ResponseWrapper::parse($response);
}
}

0 comments on commit b6d5542

Please sign in to comment.