$class * @return bool * @since 9.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 9.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 9.0.0 */ public function verifyPath($path, $fileName); /** * @param IStorage $sourceStorage * @param string $sourceInternalPath * @param string $targetInternalPath * @return bool * @since 9.0.0 */ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath); /** * @param IStorage $sourceStorage * @param string $sourceInternalPath * @param string $targetInternalPath * @return bool * @since 9.0.0 */ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath); /** * Test a storage for availability * * @since 9.0.0 * @return bool */ public function test(); /** * @since 9.0.0 * @return array [ available, last_checked ] */ public function getAvailability(); /** * @since 9.0.0 * @param bool $isAvailable */ public function setAvailability($isAvailable); /** * @param string $path path for which to retrieve the owner * @since 9.0.0 */ public function getOwner($path); /** * @param string $path * @param IStorage|null $storage * @return ICache * @since 9.0.0 */ public function getCache($path = '', $storage = null); /** * @return IPropagator * @since 9.0.0 */ public function getPropagator(); /** * @return IScanner * @since 9.0.0 */ public function getScanner(); /** * @return IUpdater * @since 9.0.0 */ public function getUpdater(); /** * @return IWatcher * @since 9.0.0 */ public function getWatcher(); /** * Allow setting the storage owner * * This can be used for storages that do not have a dedicated owner, where we want to * pass the user that we setup the mountpoint for along to the storage layer * * @param string|null $user Owner user id * @return void * @since 30.0.0 */ public function setOwner(?string $user): void; }