1 | <?php |
||
7 | class IndexObject |
||
8 | { |
||
9 | const TYPE_DIR = 1; |
||
10 | const TYPE_FILE = 2; |
||
11 | const TYPE_LINK = 3; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $relativePath; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | protected $type; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | protected $mtime; |
||
27 | |||
28 | /** |
||
29 | * @var int |
||
30 | */ |
||
31 | protected $ctime; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | protected $mode; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | protected $size; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $linkTarget; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $blobId; |
||
52 | |||
53 | protected function __construct() {} |
||
54 | |||
55 | public function getRelativePath(): string |
||
59 | |||
60 | public function getType(): int |
||
64 | |||
65 | public function isDirectory(): bool |
||
69 | |||
70 | public function isFile(): bool |
||
74 | |||
75 | public function isLink(): bool |
||
79 | |||
80 | public function getMtime(): int |
||
84 | |||
85 | public function getCtime(): int |
||
89 | |||
90 | public function getMode(): int |
||
94 | |||
95 | public function getSize(): ?int |
||
99 | |||
100 | public function getLinkTarget() |
||
104 | |||
105 | public function getBlobId() |
||
109 | |||
110 | public function setBlobId(string $blobId): IndexObject |
||
116 | |||
117 | public function getIndexRecord(): array |
||
121 | |||
122 | public function equals(IndexObject $other = null): bool |
||
141 | |||
142 | public static function fromIndexRecord(array $row): IndexObject |
||
156 | |||
157 | public static function fromPath(string $basePath, string $relativePath): IndexObject |
||
193 | } |
||
194 |