IWatcher

interface OCP\Files\Cache\IWatcher
check the storage backends for updates and change the cache accordingly
Implemented by:OC\Files\Cache\Watcher
Source:lib/public/Files/Cache/IWatcher.php#31

Constants

CHECK_NEVER = 0
Source:lib/public/Files/Cache/IWatcher.php#32
CHECK_ONCE = 1
Source:lib/public/Files/Cache/IWatcher.php#33
CHECK_ALWAYS = 2
Source:lib/public/Files/Cache/IWatcher.php#34

Methods

public OCP\Files\Cache\IWatcher::setPolicy($policy)
Source:

lib/public/Files/Cache/IWatcher.php#40

Parameters:
  • $policy (int) either IWatcher::CHECK_NEVER, IWatcher::CHECK_ONCE, IWatcher::CHECK_ALWAYS
Since:

9.0.0

public OCP\Files\Cache\IWatcher::getPolicy()
Source:lib/public/Files/Cache/IWatcher.php#46
Returns:int either IWatcher::CHECK_NEVER, IWatcher::CHECK_ONCE, IWatcher::CHECK_ALWAYS
Since:9.0.0
public OCP\Files\Cache\IWatcher::checkUpdate($path, $cachedEntry=null)
check $path for updates and update if needed
Source:

lib/public/Files/Cache/IWatcher.php#56

Parameters:
Returns:

bool true if path was updated

Since:

9.0.0

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

lib/public/Files/Cache/IWatcher.php#65

Parameters:
Since:

9.0.0

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

lib/public/Files/Cache/IWatcher.php#75

Parameters:
Returns:

bool

Since:

9.0.0

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

lib/public/Files/Cache/IWatcher.php#83

Parameters:
  • $path (string)
Since:

9.0.0