Storage

interface OC\Files\Storage\Storage
Provide a common interface to all different storage options
All 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:

lib/private/Files/Storage/Storage.php#44

Parameters:
  • $path (string)
Returns:

\OC\Files\Cache\Cache

public OC\Files\Storage\Storage::getScanner($path="", $storage=null)
get a scanner instance for the storage
Source:

lib/private/Files/Storage/Storage.php#53

Parameters:
  • $path (string)
Returns:

\OC\Files\Cache\Scanner

public OC\Files\Storage\Storage::getOwner($path)
get the user id of the owner of a file or folder
Source:

lib/private/Files/Storage/Storage.php#62

Parameters:
  • $path (string)
Returns:

string

public OC\Files\Storage\Storage::getWatcher($path="", $storage=null)
get a watcher instance for the cache
Source:

lib/private/Files/Storage/Storage.php#71

Parameters:
  • $path (string)
Returns:

\OC\Files\Cache\Watcher

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:

lib/private/Files/Storage/Storage.php#98

Parameters:
  • $path (string)
Returns:

array | null

public OC\Files\Storage\Storage::acquireLock($path, $type, $provider)
Source:

lib/private/Files/Storage/Storage.php#106

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:

\OCP\Lock\LockedException

public OC\Files\Storage\Storage::releaseLock($path, $type, $provider)
Source:

lib/private/Files/Storage/Storage.php#114

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:

\OCP\Lock\LockedException

public OC\Files\Storage\Storage::changeLock($path, $type, $provider)
Source:

lib/private/Files/Storage/Storage.php#122

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:

\OCP\Lock\LockedException

public OC\Files\Storage\Storage::getDirectoryContent($directory)
Get the contents of a directory with metadata
Source:

lib/private/Files/Storage/Storage.php#140

Parameters:
  • $directory (string)
Returns:

\Traversable an iterator, containing file metadata

The metadata array will contain the following fields

- name - mimetype - mtime - size - etag - storage_mtime - permissions