$class * @return bool * @since 7.0.0 * @psalm-assert-if-true T $this */ public function instanceOfStorage($class); /** * A custom storage implementation can return an url for direct download of a give file. * * For now the returned array can hold the parameter url - in future more attributes might follow. * * @param string $path * @return array|bool * @since 8.0.0 */ public function getDirectDownload($path); /** * @param string $path the path of the target folder * @param string $fileName the name of the file itself * @return void * @throws InvalidPathException * @since 8.1.0 */ public function verifyPath($path, $fileName); /** * @param IStorage $sourceStorage * @param string $sourceInternalPath * @param string $targetInternalPath * @return bool * @since 8.1.0 */ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath); /** * @param IStorage $sourceStorage * @param string $sourceInternalPath * @param string $targetInternalPath * @return bool * @since 8.1.0 */ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath); /** * @param string $path The path of the file to acquire the lock for * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE * @param \OCP\Lock\ILockingProvider $provider * @throws \OCP\Lock\LockedException * @since 8.1.0 */ public function acquireLock($path, $type, ILockingProvider $provider); /** * @param string $path The path of the file to acquire the lock for * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE * @param \OCP\Lock\ILockingProvider $provider * @throws \OCP\Lock\LockedException * @since 8.1.0 */ public function releaseLock($path, $type, ILockingProvider $provider); /** * @param string $path The path of the file to change the lock for * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE * @param \OCP\Lock\ILockingProvider $provider * @throws \OCP\Lock\LockedException * @since 8.1.0 */ public function changeLock($path, $type, ILockingProvider $provider); /** * Test a storage for availability * * @since 8.2.0 * @return bool */ public function test(); /** * @since 8.2.0 * @return array [ available, last_checked ] */ public function getAvailability(); /** * @since 8.2.0 * @param bool $isAvailable */ public function setAvailability($isAvailable); /** * @since 12.0.0 * @return mixed */ public function needsPartFile(); }