| 1 | <?php |
||
| 7 | class Remote implements File |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * File size |
||
| 11 | * |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | protected $size; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Filename |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $filename; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Full path with filename |
||
| 25 | * |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | protected $pathname; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * File's last modified unix timestamp |
||
| 32 | * |
||
| 33 | * @var int |
||
| 34 | */ |
||
| 35 | protected $lastModified; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Return the filesize. |
||
| 39 | * |
||
| 40 | * @return integer |
||
| 41 | */ |
||
| 42 | 4 | public function getSize(): int |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Return the filename. |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | 8 | public function getFilename(): string |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Return the full path and filename. |
||
| 59 | * |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | 4 | public function getPathname(): string |
|
| 66 | |||
| 67 | /** |
||
| 68 | * Return last modified date as unix timestamp. |
||
| 69 | * |
||
| 70 | * @return integer |
||
| 71 | */ |
||
| 72 | 4 | public function getMTime(): int |
|
| 76 | |||
| 77 | /** |
||
| 78 | * Return whether the file is writable or not. |
||
| 79 | * |
||
| 80 | * @return boolean |
||
| 81 | */ |
||
| 82 | public function isWritable(): bool |
||
| 86 | |||
| 87 | /** |
||
| 88 | * Deletes the file. |
||
| 89 | * |
||
| 90 | * @throws \phpbu\App\Exception |
||
| 91 | */ |
||
| 92 | public function unlink() |
||
| 96 | } |