Nextcloud PHP API (stable19)

IWatcher

check the storage backends for updates and change the cache accordingly

Tags
since
9.0.0

Table of Contents

CHECK_ALWAYS  = 2
CHECK_NEVER  = 0
CHECK_ONCE  = 1
checkUpdate()  : bool
check $path for updates and update if needed
cleanFolder()  : mixed
remove deleted files in $path from the cache
getPolicy()  : int
needsUpdate()  : bool
Check if the cache for $path needs to be updated
setPolicy()  : mixed
update()  : mixed
Update the cache for changes to $path

Constants

CHECK_ALWAYS

public mixed CHECK_ALWAYS = 2

CHECK_NEVER

public mixed CHECK_NEVER = ""

Methods

checkUpdate()

check $path for updates and update if needed

public checkUpdate(string $path[, ICacheEntry|null $cachedEntry = null ]) : bool
Parameters
$path : string
$cachedEntry : ICacheEntry|null = null
Tags
since
9.0.0
Return values
bool

true if path was updated

cleanFolder()

remove deleted files in $path from the cache

public cleanFolder(string $path) : mixed
Parameters
$path : string
Tags
since
9.0.0
Return values
mixed

getPolicy()

public getPolicy() : int
Tags
since
9.0.0
Return values
int

either IWatcher::CHECK_NEVER, IWatcher::CHECK_ONCE, IWatcher::CHECK_ALWAYS

needsUpdate()

Check if the cache for $path needs to be updated

public needsUpdate(string $path, ICacheEntry $cachedData) : bool
Parameters
$path : string
$cachedData : ICacheEntry
Tags
since
9.0.0
Return values
bool

setPolicy()

public setPolicy(int $policy) : mixed
Parameters
$policy : int

either IWatcher::CHECK_NEVER, IWatcher::CHECK_ONCE, IWatcher::CHECK_ALWAYS

Tags
since
9.0.0
Return values
mixed

update()

Update the cache for changes to $path

public update(string $path, ICacheEntry $cachedData) : mixed
Parameters
$path : string
$cachedData : ICacheEntry
Tags
since
9.0.0
Return values
mixed

Search results