| @@ 358-369 (lines=12) @@ | ||
| 355 | * @param $path |
|
| 356 | * @return int|mixed |
|
| 357 | */ |
|
| 358 | private function getContentLength($path) { |
|
| 359 | if (isset($this->filesCache[$path])) { |
|
| 360 | return $this->filesCache[$path]['ContentLength']; |
|
| 361 | } |
|
| 362 | ||
| 363 | $result = $this->headObject($path); |
|
| 364 | if (isset($result['ContentLength'])) { |
|
| 365 | return $result['ContentLength']; |
|
| 366 | } |
|
| 367 | ||
| 368 | return 0; |
|
| 369 | } |
|
| 370 | ||
| 371 | /** |
|
| 372 | * Return last modified for object |
|
| @@ 380-391 (lines=12) @@ | ||
| 377 | * @param $path |
|
| 378 | * @return mixed|string |
|
| 379 | */ |
|
| 380 | private function getLastModified($path) { |
|
| 381 | if (isset($this->filesCache[$path])) { |
|
| 382 | return $this->filesCache[$path]['LastModified']; |
|
| 383 | } |
|
| 384 | ||
| 385 | $result = $this->headObject($path); |
|
| 386 | if (isset($result['LastModified'])) { |
|
| 387 | return $result['LastModified']; |
|
| 388 | } |
|
| 389 | ||
| 390 | return 'now'; |
|
| 391 | } |
|
| 392 | ||
| 393 | public function is_dir($path) { |
|
| 394 | $path = $this->normalizePath($path); |
|