| @@ 222-231 (lines=10) @@ | ||
| 219 | /** |
|
| 220 | * {@inheritdoc} |
|
| 221 | */ |
|
| 222 | public function mtime($key) |
|
| 223 | { |
|
| 224 | try { |
|
| 225 | $result = $this->service->headObject($this->getOptions($key)); |
|
| 226 | ||
| 227 | return strtotime($result['LastModified']); |
|
| 228 | } catch (\Exception $e) { |
|
| 229 | return false; |
|
| 230 | } |
|
| 231 | } |
|
| 232 | ||
| 233 | /** |
|
| 234 | * {@inheritdoc} |
|
| @@ 236-245 (lines=10) @@ | ||
| 233 | /** |
|
| 234 | * {@inheritdoc} |
|
| 235 | */ |
|
| 236 | public function size($key) |
|
| 237 | { |
|
| 238 | try { |
|
| 239 | $result = $this->service->headObject($this->getOptions($key)); |
|
| 240 | ||
| 241 | return $result['ContentLength']; |
|
| 242 | } catch (\Exception $e) { |
|
| 243 | return false; |
|
| 244 | } |
|
| 245 | } |
|
| 246 | ||
| 247 | /** |
|
| 248 | * {@inheritdoc} |
|
| @@ 500-508 (lines=9) @@ | ||
| 497 | * |
|
| 498 | * @return string |
|
| 499 | */ |
|
| 500 | public function mimeType($key) |
|
| 501 | { |
|
| 502 | try { |
|
| 503 | $result = $this->service->headObject($this->getOptions($key)); |
|
| 504 | ||
| 505 | return $result['ContentType']; |
|
| 506 | } catch (\Exception $e) { |
|
| 507 | return false; |
|
| 508 | } |
|
| 509 | } |
|
| 510 | } |
|
| 511 | ||