1 | <?php |
||
10 | class NativeFileInfo implements IFileInfo { |
||
11 | const MODE_FILE = 0100000; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $path; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $name; |
||
22 | |||
23 | /** |
||
24 | * @var \Icewind\SMB\NativeShare |
||
25 | */ |
||
26 | protected $share; |
||
27 | |||
28 | /** |
||
29 | * @var array|null |
||
30 | */ |
||
31 | protected $statCache; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | protected $modeCache; |
||
37 | |||
38 | /** |
||
39 | * @param \Icewind\SMB\NativeShare $share |
||
40 | * @param string $path |
||
41 | * @param string $name |
||
42 | * @param array $stat |
||
43 | */ |
||
44 | public function __construct($share, $path, $name, $stat = null) { |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getPath() { |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getName() { |
||
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | protected function stat() { |
||
74 | |||
75 | /** |
||
76 | * @return int |
||
77 | */ |
||
78 | public function getSize() { |
||
82 | |||
83 | /** |
||
84 | * @return int |
||
85 | */ |
||
86 | public function getMTime() { |
||
90 | |||
91 | /** |
||
92 | * @return bool |
||
93 | */ |
||
94 | public function isDirectory() { |
||
98 | |||
99 | /** |
||
100 | * @return int |
||
101 | */ |
||
102 | protected function getMode() { |
||
110 | |||
111 | /** |
||
112 | * @return bool |
||
113 | */ |
||
114 | public function isReadOnly() { |
||
118 | |||
119 | /** |
||
120 | * @return bool |
||
121 | */ |
||
122 | public function isHidden() { |
||
126 | |||
127 | /** |
||
128 | * @return bool |
||
129 | */ |
||
130 | public function isSystem() { |
||
134 | |||
135 | /** |
||
136 | * @return bool |
||
137 | */ |
||
138 | public function isArchived() { |
||
142 | } |
||
143 |