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; |
||
34 | |||
35 | /** |
||
36 | * @var int |
||
37 | */ |
||
38 | protected $modeCache; |
||
39 | |||
40 | /** |
||
41 | * @param NativeShare $share |
||
42 | * @param string $path |
||
43 | * @param string $name |
||
44 | * @param array $stat |
||
45 | */ |
||
46 | 104 | public function __construct($share, $path, $name, $stat = null) { |
|
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | 102 | public function getPath() { |
|
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | 49 | public function getName() { |
|
66 | |||
67 | /** |
||
68 | * @return array |
||
69 | */ |
||
70 | 102 | protected function stat() { |
|
76 | |||
77 | /** |
||
78 | * @return int |
||
79 | */ |
||
80 | 29 | public function getSize() { |
|
84 | |||
85 | /** |
||
86 | * @return int |
||
87 | */ |
||
88 | 1 | public function getMTime() { |
|
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | 101 | public function isDirectory() { |
|
100 | |||
101 | /** |
||
102 | * @return int |
||
103 | */ |
||
104 | 14 | protected function getMode() { |
|
112 | |||
113 | /** |
||
114 | * @return bool |
||
115 | */ |
||
116 | 9 | public function isReadOnly() { |
|
120 | |||
121 | /** |
||
122 | * @return bool |
||
123 | */ |
||
124 | 13 | public function isHidden() { |
|
128 | |||
129 | /** |
||
130 | * @return bool |
||
131 | */ |
||
132 | 8 | public function isSystem() { |
|
136 | |||
137 | /** |
||
138 | * @return bool |
||
139 | */ |
||
140 | 8 | public function isArchived() { |
|
144 | } |
||
145 |