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: Parameters: - $storage (
OC\Files\Storage\Storage
)
- $storage (
-
public
OC\Files\Cache\Watcher::
setPolicy
($policy)¶ Source: 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: Parameters: - $path (string)
- $cachedEntry (
OCP\Files\Cache\ICacheEntry
| null)
Returns: bool true if path was updated
-
public
OC\Files\Cache\Watcher::
update
($path, $cachedData)¶ - Update the cache for changes to $path
Source: Parameters: - $path (string)
- $cachedData (
OCP\Files\Cache\ICacheEntry
)
-
public
OC\Files\Cache\Watcher::
needsUpdate
($path, $cachedData)¶ - Check if the cache for $path needs to be updated
Source: Parameters: - $path (string)
- $cachedData (
OCP\Files\Cache\ICacheEntry
)
Returns: bool
-
public
OC\Files\Cache\Watcher::
cleanFolder
($path)¶ - remove deleted files in $path from the cache
Source: Parameters: - $path (string)