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