diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-05-29 14:40:06 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-06-01 13:24:02 +0200 |
commit | 661c9e2444c097aad7e47b77df4fc2b10c346d04 (patch) | |
tree | 1d3481ae80822bd7ecbcbad534c2e64e9661496c /lib/private/files/storage/common.php | |
parent | a1372b2fb5acc51eacf70012a6702a96c78e61ff (diff) | |
download | nextcloud-server-661c9e2444c097aad7e47b77df4fc2b10c346d04.tar.gz nextcloud-server-661c9e2444c097aad7e47b77df4fc2b10c346d04.zip |
add changeLock to the storage api
Diffstat (limited to 'lib/private/files/storage/common.php')
-rw-r--r-- | lib/private/files/storage/common.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index f0c9e1bfa05..847cb8492fe 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -641,4 +641,13 @@ abstract class Common implements Storage { public function releaseLock($path, $type, ILockingProvider $provider) { $provider->releaseLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type); } + + /** + * @param string $path + * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE + * @param \OCP\Lock\ILockingProvider $provider + */ + public function changeLock($path, $type, ILockingProvider $provider) { + $provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type); + } } |