Watcher

class OC\Files\Cache\Watcher
check the storage backends for updates and change the cache accordingly
Source:lib/private/Files/Cache/Watcher.php#36
Implements:OCP\Files\Cache\IWatcher

Properties

protected static property OC\Files\Cache\Watcher::$watchPolicy
Source:lib/private/Files/Cache/Watcher.php#37
protected static property OC\Files\Cache\Watcher::$checkedPaths
Source:lib/private/Files/Cache/Watcher.php#39
protected static property OC\Files\Cache\Watcher::$storage
Source:lib/private/Files/Cache/Watcher.php#44
Type:\OC\Files\Storage\Storage
protected static property OC\Files\Cache\Watcher::$cache
Source:lib/private/Files/Cache/Watcher.php#49
Type:\OC\Files\Cache\Cache
protected static property OC\Files\Cache\Watcher::$scanner
Source:lib/private/Files/Cache/Watcher.php#54
Type:\OC\Files\Cache\Scanner ;

Methods

public OC\Files\Cache\Watcher::__construct($storage)
Source:

lib/private/Files/Cache/Watcher.php#59

Parameters:
public OC\Files\Cache\Watcher::setPolicy($policy)
Source:

lib/private/Files/Cache/Watcher.php#68

Parameters:
  • $policy (int) either OCFilesCacheWatcher::CHECK_NEVER, OCFilesCacheWatcher::CHECK_ONCE, OCFilesCacheWatcher::CHECK_ALWAYS
public OC\Files\Cache\Watcher::getPolicy()
Source:lib/private/Files/Cache/Watcher.php#75
Returns:int either \OC\Files\Cache\Watcher::CHECK_NEVER, \OC\Files\Cache\Watcher::CHECK_ONCE, \OC\Files\Cache\Watcher::CHECK_ALWAYS
public OC\Files\Cache\Watcher::checkUpdate($path, $cachedEntry=null)
check $path for updates and update if needed
Source:

lib/private/Files/Cache/Watcher.php#86

Parameters:
Returns:

bool true if path was updated

public OC\Files\Cache\Watcher::update($path, $cachedData)
Update the cache for changes to $path
Source:

lib/private/Files/Cache/Watcher.php#104

Parameters:
public OC\Files\Cache\Watcher::needsUpdate($path, $cachedData)
Check if the cache for $path needs to be updated
Source:

lib/private/Files/Cache/Watcher.php#125

Parameters:
Returns:

bool

public OC\Files\Cache\Watcher::cleanFolder($path)
remove deleted files in $path from the cache
Source:

lib/private/Files/Cache/Watcher.php#138

Parameters:
  • $path (string)