Storage¶
-
interface
OC\Files\Storage\
Storage
¶ - Provide a common interface to all different storage optionsAll paths passed to the storage are relative to the storage and should NOT have a leading slash.
Implemented by: OC\Files\Storage\Wrapper\Wrapper
OC\Files\Storage\Common
Source: lib/private/Files/Storage/Storage.php#35 Parent: OCP\Files\Storage
Methods¶
-
public
OC\Files\Storage\Storage::
getCache
($path="", $storage=null)¶ - get a cache instance for the storage
Source: Parameters: - $path (string)
Returns:
-
public
OC\Files\Storage\Storage::
getScanner
($path="", $storage=null)¶ - get a scanner instance for the storage
Source: Parameters: - $path (string)
Returns:
-
public
OC\Files\Storage\Storage::
getOwner
($path)¶ - get the user id of the owner of a file or folder
Source: Parameters: - $path (string)
Returns: string
-
public
OC\Files\Storage\Storage::
getWatcher
($path="", $storage=null)¶ - get a watcher instance for the cache
Source: Parameters: - $path (string)
Returns:
-
public
OC\Files\Storage\Storage::
getPropagator
($storage=null)¶ - get a propagator instance for the cache
Source: lib/private/Files/Storage/Storage.php#79 Parameters: Returns: \OC\Files\Cache\Propagator
-
public
OC\Files\Storage\Storage::
getUpdater
($storage=null)¶ - get a updater instance for the cache
Source: lib/private/Files/Storage/Storage.php#87 Parameters: Returns: \OC\Files\Cache\Updater
-
public
OC\Files\Storage\Storage::
getStorageCache
()¶ Source: lib/private/Files/Storage/Storage.php#92 Returns: \OC\Files\Cache\Storage
-
public
OC\Files\Storage\Storage::
getMetaData
($path)¶ Source: Parameters: - $path (string)
Returns: array | null
-
public
OC\Files\Storage\Storage::
acquireLock
($path, $type, $provider)¶ Source: Parameters: - $path (string) The path of the file to acquire the lock for
- $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
- $provider (
OCP\Lock\ILockingProvider
)
Throws:
-
public
OC\Files\Storage\Storage::
releaseLock
($path, $type, $provider)¶ Source: Parameters: - $path (string) The path of the file to release the lock for
- $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
- $provider (
OCP\Lock\ILockingProvider
)
Throws:
-
public
OC\Files\Storage\Storage::
changeLock
($path, $type, $provider)¶ Source: Parameters: - $path (string) The path of the file to change the lock for
- $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
- $provider (
OCP\Lock\ILockingProvider
)
Throws:
-
public
OC\Files\Storage\Storage::
getDirectoryContent
($directory)¶ - Get the contents of a directory with metadata
Source: Parameters: - $directory (string)
Returns: \Traversable
an iterator, containing file metadataThe metadata array will contain the following fields
- name - mimetype - mtime - size - etag - storage_mtime - permissions