1 | <?php |
||
12 | class NativeFileInfo implements IFileInfo { |
||
13 | const MODE_FILE = 0100000; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $path; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $name; |
||
24 | |||
25 | /** |
||
26 | * @var NativeShare |
||
27 | */ |
||
28 | protected $share; |
||
29 | |||
30 | /** |
||
31 | * @var array|null |
||
32 | */ |
||
33 | protected $statCache = null; |
||
34 | |||
35 | /** @var callable|null */ |
||
36 | protected $statCallback = null; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | protected $modeCache; |
||
42 | |||
43 | /** |
||
44 | * @param NativeShare $share |
||
45 | * @param string $path |
||
46 | * @param string $name |
||
47 | * @param array|callable $stat |
||
48 | */ |
||
49 | public function __construct($share, $path, $name, $stat) { |
||
62 | |||
63 | /** |
||
64 | * @return string |
||
65 | */ |
||
66 | public function getPath() { |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getName() { |
||
76 | |||
77 | /** |
||
78 | * @return array |
||
79 | */ |
||
80 | protected function stat() { |
||
86 | |||
87 | /** |
||
88 | * @return int |
||
89 | */ |
||
90 | public function getSize() { |
||
94 | |||
95 | /** |
||
96 | * @return int |
||
97 | */ |
||
98 | public function getMTime() { |
||
102 | |||
103 | /** |
||
104 | * @return bool |
||
105 | */ |
||
106 | public function isDirectory() { |
||
110 | |||
111 | /** |
||
112 | * @return int |
||
113 | */ |
||
114 | protected function getMode() { |
||
122 | |||
123 | /** |
||
124 | * @return bool |
||
125 | */ |
||
126 | public function isReadOnly() { |
||
130 | |||
131 | /** |
||
132 | * @return bool |
||
133 | */ |
||
134 | public function isHidden() { |
||
138 | |||
139 | /** |
||
140 | * @return bool |
||
141 | */ |
||
142 | public function isSystem() { |
||
146 | |||
147 | /** |
||
148 | * @return bool |
||
149 | */ |
||
150 | public function isArchived() { |
||
154 | } |
||
155 |