|
|
|
|
@ -31,6 +31,9 @@ namespace OC\Files\Storage; |
|
|
|
|
|
|
|
|
|
use OC\Files\Filesystem; |
|
|
|
|
use OCA\Files_Sharing\ISharedStorage; |
|
|
|
|
use OCA\Files_Sharing\Propagator; |
|
|
|
|
use OCA\Files_Sharing\SharedMount; |
|
|
|
|
use OCP\Lock\ILockingProvider; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Convert target path to source path and pass the function call to the correct storage provider |
|
|
|
|
@ -608,4 +611,27 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { |
|
|
|
|
list($targetStorage, $targetInternalPath) = $this->resolvePath($targetInternalPath); |
|
|
|
|
return $targetStorage->moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param string $path |
|
|
|
|
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
|
|
|
* @param \OCP\Lock\ILockingProvider $provider |
|
|
|
|
* @throws \OCP\Lock\LockedException |
|
|
|
|
*/ |
|
|
|
|
public function acquireLock($path, $type, ILockingProvider $provider) { |
|
|
|
|
/** @var \OCP\Files\Storage $targetStorage */ |
|
|
|
|
list($targetStorage, $targetInternalPath) = $this->resolvePath($path); |
|
|
|
|
$targetStorage->acquireLock($targetInternalPath, $type, $provider); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param string $path |
|
|
|
|
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
|
|
|
* @param \OCP\Lock\ILockingProvider $provider |
|
|
|
|
*/ |
|
|
|
|
public function releaseLock($path, $type, ILockingProvider $provider) { |
|
|
|
|
/** @var \OCP\Files\Storage $targetStorage */ |
|
|
|
|
list($targetStorage, $targetInternalPath) = $this->resolvePath($path); |
|
|
|
|
$targetStorage->releaseLock($targetInternalPath, $type, $provider); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|