Storage¶
-
class
OC\Files\Cache\
Storage
¶ - Handle the mapping between the string and numeric storage idsEach storage has 2 different idsa string id which is generated by the storage backend and reflects the configuration of the storage (e.g. ‘smb://user@host/share‘)and a numeric storage id which is referenced in the file cacheA mapping between the two storage ids is stored in the database and accessible trough this class
Source: lib/private/Files/Cache/Storage.php#46
Properties¶
Methods¶
-
public static
OC\Files\Cache\Storage::
getGlobalCache
()¶ Source: lib/private/Files/Cache/Storage.php#55 Returns: \OC\Files\Cache\StorageGlobal
-
public
OC\Files\Cache\Storage::
__construct
($storage, $isAvailable=true)¶ Source: Parameters: - $storage (
OC\Files\Storage\Storage
| string) - $isAvailable (bool)
Throws: \RuntimeException
- $storage (
-
public static
OC\Files\Cache\Storage::
getStorageById
($storageId)¶ Source: Parameters: - $storageId (string)
Returns: array
-
public static
OC\Files\Cache\Storage::
adjustStorageId
($storageId)¶ - Adjusts the storage id to use md5 if too long
Source: Parameters: - $storageId (string) storage id
Returns: string unchanged $storageId if its length is less than 64 characters, else returns the md5 of $storageId
-
public
OC\Files\Cache\Storage::
getNumericId
()¶ - Get the numeric id for the storage
Source: lib/private/Files/Cache/Storage.php#118 Returns: int
-
public static
OC\Files\Cache\Storage::
getStorageId
($numericId)¶ - Get the string id for the storage
Source: Parameters: - $numericId (int)
Returns: string | null either the storage id string or null if the numeric id is not known
-
public static
OC\Files\Cache\Storage::
getNumericStorageId
($storageId)¶ - Get the numeric of the storage with the provided string id
Source: Parameters: - $storageId
Returns: int | null either the numeric storage id or null if the storage id is not knwon
-
public
OC\Files\Cache\Storage::
getAvailability
()¶ Source: lib/private/Files/Cache/Storage.php#162 Returns: array | null [ available, last_checked ]
-
public
OC\Files\Cache\Storage::
setAvailability
($isAvailable, $delay=0)¶ Source: Parameters: - $isAvailable (bool)
- $delay (int) amount of seconds to delay reconsidering that storage further
-
public static
OC\Files\Cache\Storage::
exists
($storageId)¶ - Check if a string storage id is known
Source: Parameters: - $storageId (string)
Returns: bool
-
public static
OC\Files\Cache\Storage::
remove
($storageId)¶ - remove the entry for the storage
Source: Parameters: - $storageId (string)