mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-19 21:03:44 -07:00
Update spaces.php
This commit is contained in:
parent
4f2219e40f
commit
2a2c644bbd
1 changed files with 9 additions and 4 deletions
13
spaces.php
13
spaces.php
|
@ -84,8 +84,16 @@ class SpacesConnect {
|
|||
return $this->space;
|
||||
}
|
||||
|
||||
function downloadSpaceToDirectory($pathToDirectory) {
|
||||
$this->client->downloadBucket($pathToDirectory, $this->space);
|
||||
}
|
||||
|
||||
function destroyThisSpace() {
|
||||
$this->setSpace(NULL);
|
||||
$objects = $this->listObjects();
|
||||
foreach ($objects as $value) {
|
||||
$key = $value["Key"];
|
||||
$this->deleteObject($key);
|
||||
}
|
||||
$this->client->deleteBucket(array('Bucket' => $this->space));
|
||||
$this->client->waitUntil('BucketNotExists', array('Bucket' => $this->space));
|
||||
}
|
||||
|
@ -154,9 +162,6 @@ class SpacesConnect {
|
|||
$this->client->uploadDirectory($directory, $this->space, $keyPrefix);
|
||||
}
|
||||
|
||||
function downloadSpaceToDirectory($pathToDirectory) {
|
||||
$this->client->downloadBucket($pathToDirectory, $this->space);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue