IScanner¶
-
interface
OCP\Files\Cache\
IScanner
¶ - Scan files from the storage and save to the cache
Implemented by: OC\Files\Cache\Scanner
Source: lib/public/Files/Cache/IScanner.php#31
Constants¶
-
SCAN_RECURSIVE_INCOMPLETE = 2
Source: lib/public/Files/Cache/IScanner.php#32
-
SCAN_RECURSIVE = true
Source: lib/public/Files/Cache/IScanner.php#33
-
SCAN_SHALLOW = false
Source: lib/public/Files/Cache/IScanner.php#34
-
REUSE_NONE = 0
Source: lib/public/Files/Cache/IScanner.php#36
-
REUSE_ETAG = 1
Source: lib/public/Files/Cache/IScanner.php#37
-
REUSE_SIZE = 2
Source: lib/public/Files/Cache/IScanner.php#38
Methods¶
-
public
OCP\Files\Cache\IScanner::
scanFile
($file, $reuseExisting=0, $parentId=-1, $cacheData=null, $lock=true)¶ - scan a single file and store it in the cache
Source: Parameters: - $file (string)
- $reuseExisting (int)
- $parentId (int)
- $lock (bool) set to false to disable getting an additional read lock during scanning
Returns: array | null an array of metadata of the scanned file
Throws: Throws: Throws: Throws: Since: 9.0.0
-
public
OCP\Files\Cache\IScanner::
scan
($path, $recursive=self::SCAN_RECURSIVE, $reuse=-1, $lock=true)¶ - scan a folder and all its children
Source: Parameters: - $path (string)
- $recursive (bool)
- $reuse (int)
- $lock (bool) set to false to disable getting an additional read lock during scanning
Returns: array | null an array of the meta data of the scanned file or folder
Since: 9.0.0
-
public static
OCP\Files\Cache\IScanner::
isPartialFile
($file)¶ - check if the file should be ignored when scanningNOTE: files with a ‘.part’ extension are ignored as well!prevents unfinished put requests to be scanned
Source: Parameters: - $file (string)
Returns: bool
Since: 9.0.0
-
public
OCP\Files\Cache\IScanner::
backgroundScan
()¶ - walk over any folders that are not fully scanned yet and scan them
Source: lib/public/Files/Cache/IScanner.php#83 Since: 9.0.0