Scanner

class OC\Files\Utils\Scanner
Class Scanner
Hooks available in scope \OC\Utils\Scanner
- scanFile(string $absolutePath)
- scanFolder(string $absolutePath)
Source:lib/private/Files/Utils/Scanner.php#63
Parent:OC\Hooks\PublicEmitter

Constants

MAX_ENTRIES_TO_COMMIT = 10000
Source:lib/private/Files/Utils/Scanner.php#64

Properties

protected static property OC\Files\Utils\Scanner::$db
Source:lib/private/Files/Utils/Scanner.php#70
Type:\OCP\IDBConnection
protected static property OC\Files\Utils\Scanner::$logger
Source:lib/private/Files/Utils/Scanner.php#76
Type:\OCP\ILogger
protected static property OC\Files\Utils\Scanner::$useTransaction
Whether to use a DB transaction
Source:lib/private/Files/Utils/Scanner.php#83
Type:bool
protected static property OC\Files\Utils\Scanner::$entriesToCommit
Number of entries scanned to commit
Source:lib/private/Files/Utils/Scanner.php#90
Type:int

Methods

public OC\Files\Utils\Scanner::__construct($user, $db, $dispatcher, $logger)
Source:

lib/private/Files/Utils/Scanner.php#98

Parameters:
protected OC\Files\Utils\Scanner::getMounts($dir)
get all storages for $dir
Source:

lib/private/Files/Utils/Scanner.php#113

Parameters:
  • $dir (string)
Returns:

\OC\Files\Mount\MountPoint[]

protected OC\Files\Utils\Scanner::attachListener($mount)
attach listeners to the scanner
Source:

lib/private/Files/Utils/Scanner.php#131

Parameters:
public OC\Files\Utils\Scanner::backgroundScan($dir)
Source:

lib/private/Files/Utils/Scanner.php#154

Parameters:
  • $dir (string)
public OC\Files\Utils\Scanner::scan($dir="", $recursive=\OC\Files\Cache\Scanner::SCAN_RECURSIVE, $mountFilter=null)
Source:

lib/private/Files/Utils/Scanner.php#198

Parameters:
  • $dir (string)
  • $recursive
  • $mountFilter (callable | null)
Throws:

\OC\ForbiddenException

Throws:

\OCP\Files\NotFoundException

Throws:

\OC\ForbiddenException

Throws:

\OCP\Files\NotFoundException