1 | <?php |
||
19 | class Simulation implements File |
||
20 | { |
||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $time; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | private $size; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $path; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $file; |
||
40 | |||
41 | /** |
||
42 | * Constructor |
||
43 | * |
||
44 | * @param int $time |
||
45 | * @param int $size |
||
46 | * @param string $path |
||
47 | * @param string $file |
||
48 | */ |
||
49 | public function __construct(int $time, int $size, string $path, string $file) |
||
56 | |||
57 | /** |
||
58 | * Return the filesize. |
||
59 | * |
||
60 | * @return integer |
||
61 | */ |
||
62 | public function getSize(): int |
||
66 | |||
67 | /** |
||
68 | * Return the filename. |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | public function getFilename(): string |
||
76 | |||
77 | /** |
||
78 | * Return the full path and filename. |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | public function getPathname(): string |
||
86 | |||
87 | /** |
||
88 | * Return the path. |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getPath() |
||
96 | |||
97 | /** |
||
98 | * Return last modified date as unix timestamp. |
||
99 | * |
||
100 | * @return integer |
||
101 | */ |
||
102 | public function getMTime(): int |
||
106 | |||
107 | /** |
||
108 | * Return whether the file is writable or not. |
||
109 | * |
||
110 | * @return boolean |
||
111 | */ |
||
112 | public function isWritable(): bool |
||
116 | |||
117 | /** |
||
118 | * Deletes the file. |
||
119 | */ |
||
120 | public function unlink() |
||
124 | } |
||
125 |