1 | <?php |
||
30 | class NoopScanner extends Scanner { |
||
31 | public function __construct(Storage $storage) { |
||
35 | |||
36 | /** |
||
37 | * scan a single file and store it in the cache |
||
38 | * |
||
39 | * @param string $file |
||
40 | * @param int $reuseExisting |
||
41 | * @param int $parentId |
||
42 | * @param array|null $cacheData existing data in the cache for the file to be scanned |
||
43 | * @return array an array of metadata of the scanned file |
||
44 | */ |
||
45 | public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true) { |
||
49 | |||
50 | /** |
||
51 | * scan a folder and all it's children |
||
52 | * |
||
53 | * @param string $path |
||
54 | * @param bool $recursive |
||
55 | * @param int $reuse |
||
56 | * @return array with the meta data of the scanned file or folder |
||
57 | */ |
||
58 | public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) { |
||
63 | |||
64 | /** |
||
65 | * walk over any folders that are not fully scanned yet and scan them |
||
66 | */ |
||
67 | public function backgroundScan() { |
||
70 | |||
71 | /** |
||
72 | * scan all the files and folders in a folder |
||
73 | * |
||
74 | * @param string $path |
||
75 | * @param bool $recursive |
||
76 | * @param int $reuse |
||
77 | * @param array $folderData existing cache data for the folder to be scanned |
||
78 | * @return int the size of the scanned folder or -1 if the size is unknown at this stage |
||
79 | */ |
||
80 | protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderData = null, $lock = true) { |
||
83 | |||
84 | /** |
||
85 | * Update file checksums |
||
86 | * |
||
87 | * @param string $path |
||
88 | */ |
||
89 | private function updateChecksums($path) { |
||
98 | } |
||
99 |