1 | <?php |
||
10 | class FileInfo implements IFileInfo { |
||
11 | /* |
||
12 | * Mappings of the DOS mode bits, as returned by smbc_getxattr() when the |
||
13 | * attribute name "system.dos_attr.mode" (or "system.dos_attr.*" or |
||
14 | * "system.*") is specified. |
||
15 | */ |
||
16 | const MODE_READONLY = 0x01; |
||
17 | const MODE_HIDDEN = 0x02; |
||
18 | const MODE_SYSTEM = 0x04; |
||
19 | const MODE_VOLUME_ID = 0x08; |
||
20 | const MODE_DIRECTORY = 0x10; |
||
21 | const MODE_ARCHIVE = 0x20; |
||
22 | const MODE_NORMAL = 0x80; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $path; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $name; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $size; |
||
38 | |||
39 | /** |
||
40 | * @var int |
||
41 | */ |
||
42 | protected $time; |
||
43 | |||
44 | /** |
||
45 | * @var int |
||
46 | */ |
||
47 | protected $mode; |
||
48 | |||
49 | /** |
||
50 | * @param string $path |
||
51 | * @param string $name |
||
52 | * @param int $size |
||
53 | * @param int $time |
||
54 | * @param int $mode |
||
55 | */ |
||
56 | 4 | public function __construct($path, $name, $size, $time, $mode) { |
|
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getPath() { |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getName() { |
||
77 | |||
78 | /** |
||
79 | * @return int |
||
80 | */ |
||
81 | public function getSize() { |
||
84 | |||
85 | /** |
||
86 | * @return int |
||
87 | */ |
||
88 | public function getMTime() { |
||
91 | |||
92 | /** |
||
93 | * @return bool |
||
94 | */ |
||
95 | public function isDirectory() { |
||
98 | |||
99 | /** |
||
100 | * @return bool |
||
101 | */ |
||
102 | public function isReadOnly() { |
||
105 | |||
106 | /** |
||
107 | * @return bool |
||
108 | */ |
||
109 | public function isHidden() { |
||
112 | |||
113 | /** |
||
114 | * @return bool |
||
115 | */ |
||
116 | public function isSystem() { |
||
119 | |||
120 | /** |
||
121 | * @return bool |
||
122 | */ |
||
123 | public function isArchived() { |
||
126 | } |
||
127 |