diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-21 23:18:58 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-22 12:45:29 +0100 |
commit | 8687e0d346e7dad6890982c1a7b08befd8998aeb (patch) | |
tree | e8a6b3c3c8480cb88e9b4cd770f4828bf6fcc541 /lib | |
parent | 186c9e77e89dcd057a311ed08df9e1bb9e13ea8f (diff) | |
download | nextcloud-server-8687e0d346e7dad6890982c1a7b08befd8998aeb.tar.gz nextcloud-server-8687e0d346e7dad6890982c1a7b08befd8998aeb.zip |
add Scanner->backgroundScan
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/cache/scanner.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index e650a220f56..3c83b6528a7 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -121,4 +121,14 @@ class Scanner { } return $size; } + + /** + * walk over any folders that are not fully scanned yet and scan them + */ + public function backgroundScan() { + while ($path = $this->cache->getIncomplete()) { + $this->scan($path); + $this->cache->correctFolderSize($path); + } + } } |