| @@ 32-39 (lines=8) @@ | ||
| 29 | * @param DropboxApi $client |
|
| 30 | * @param FileMetadata $dropboxFile |
|
| 31 | */ |
|
| 32 | public function __construct(DropboxApi $client, FileMetadata $dropboxFile) |
|
| 33 | { |
|
| 34 | $this->client = $client; |
|
| 35 | $this->filename = $dropboxFile->getName(); |
|
| 36 | $this->pathname = $dropboxFile->getPathDisplay(); |
|
| 37 | $this->size = $dropboxFile->getSize(); |
|
| 38 | $this->lastModified = strtotime($dropboxFile->getClientModified()); |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Deletes the file. |
|
| @@ 42-50 (lines=9) @@ | ||
| 39 | * @param \Google_Client $client |
|
| 40 | * @param \Google_Service_Drive_DriveFile $googleFile |
|
| 41 | */ |
|
| 42 | public function __construct(Google_Client $client, Google_Service_Drive_DriveFile $googleFile) |
|
| 43 | { |
|
| 44 | $this->client = $client; |
|
| 45 | $this->filename = $googleFile->getName(); |
|
| 46 | $this->pathname = $googleFile->getId(); |
|
| 47 | $this->fileId = $googleFile->getId(); |
|
| 48 | $this->size = $googleFile->getSize(); |
|
| 49 | $this->lastModified = strtotime($googleFile->getCreatedTime()); |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Deletes the file. |
|