Nextcloud PHP API (master)

ILockingProvider

This interface allows locking and unlocking filesystem paths

This interface should be used directly and not implemented by an application. The implementation is provided by the server.

Tags
since
8.1.0

Table of Contents

Constants

LOCK_EXCLUSIVE  = 2
LOCK_SHARED  = 1

Methods

acquireLock()  : void
changeLock()  : void
Change the target type of an existing lock
isLocked()  : bool
releaseAll()  : void
Release all lock acquired by this instance
releaseLock()  : void

Constants

Methods

acquireLock()

public acquireLock(string $path, int $type[, string|null $readablePath = null ]) : void
Parameters
$path : string
$type : int
$readablePath : string|null = null

A human-readable path to use in error messages, since 20.0.0

Tags
psalm-param

self::LOCK_SHARED|self::LOCK_EXCLUSIVE $type

throws
LockedException
since
8.1.0

changeLock()

Change the target type of an existing lock

public changeLock(string $path, int $targetType) : void
Parameters
$path : string
$targetType : int
Tags
psalm-param

self::LOCK_SHARED|self::LOCK_EXCLUSIVE $targetType

throws
LockedException
since
8.1.0

isLocked()

public isLocked(string $path, int $type) : bool
Parameters
$path : string
$type : int
Tags
psalm-param

self::LOCK_SHARED|self::LOCK_EXCLUSIVE $type

since
8.1.0
Return values
bool

releaseAll()

Release all lock acquired by this instance

public releaseAll() : void
Tags
since
8.1.0

releaseLock()

public releaseLock(string $path, int $type) : void
Parameters
$path : string
$type : int
Tags
psalm-param

self::LOCK_SHARED|self::LOCK_EXCLUSIVE $type

since
8.1.0

        
On this page

Search results