\OCP\Files\CacheIScanner

Scan files from the storage and save to the cache

Summary

Methods
Constants
scanFile()
scan()
isPartialFile()
backgroundScan()
SCAN_RECURSIVE_INCOMPLETE
SCAN_RECURSIVE
SCAN_SHALLOW
REUSE_ETAG
REUSE_SIZE
No protected methods found
N/A
No private methods found
N/A

Constants

SCAN_RECURSIVE_INCOMPLETE

SCAN_RECURSIVE_INCOMPLETE

SCAN_RECURSIVE

SCAN_RECURSIVE

SCAN_SHALLOW

SCAN_SHALLOW

REUSE_ETAG

REUSE_ETAG

REUSE_SIZE

REUSE_SIZE

Methods

scanFile()

scanFile(string  $file, integer  $reuseExisting, integer  $parentId = -1,   $cacheData = null, boolean  $lock = true) : array

scan a single file and store it in the cache

Parameters

string $file
integer $reuseExisting
integer $parentId
$cacheData
boolean $lock

set to false to disable getting an additional read lock during scanning

Throws

\OC\ServerNotAvailableException
\OCP\Lock\LockedException

Returns

array —

an array of metadata of the scanned file

scan()

scan(string  $path, boolean  $recursive = self::SCAN_RECURSIVE, integer  $reuse = -1, boolean  $lock = true) : array

scan a folder and all its children

Parameters

string $path
boolean $recursive
integer $reuse
boolean $lock

set to false to disable getting an additional read lock during scanning

Returns

array —

an array of the meta data of the scanned file or folder

isPartialFile()

isPartialFile(string  $file) : boolean

check if the file should be ignored when scanning NOTE: files with a '.part' extension are ignored as well! prevents unfinished put requests to be scanned

Parameters

string $file

Returns

boolean

backgroundScan()

backgroundScan() 

walk over any folders that are not fully scanned yet and scan them