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