diff options
Diffstat (limited to 'lib/public/Files/Cache')
-rw-r--r-- | lib/public/Files/Cache/ICache.php | 15 | ||||
-rw-r--r-- | lib/public/Files/Cache/ICacheEntry.php | 8 | ||||
-rw-r--r-- | lib/public/Files/Cache/IScanner.php | 22 | ||||
-rw-r--r-- | lib/public/Files/Cache/IUpdater.php | 2 | ||||
-rw-r--r-- | lib/public/Files/Cache/IWatcher.php | 11 |
5 files changed, 55 insertions, 3 deletions
diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php index 1934cc24bd4..0a08673d6c3 100644 --- a/lib/public/Files/Cache/ICache.php +++ b/lib/public/Files/Cache/ICache.php @@ -38,9 +38,24 @@ use OCP\Files\Search\ISearchQuery; * @since 9.0.0 */ interface ICache { + /** + * @since 9.0.0 + */ public const NOT_FOUND = 0; + + /** + * @since 9.0.0 + */ public const PARTIAL = 1; //only partial data available, file not cached in the database + + /** + * @since 9.0.0 + */ public const SHALLOW = 2; //folder in cache, but not all child files are completely scanned + + /** + * @since 9.0.0 + */ public const COMPLETE = 3; /** diff --git a/lib/public/Files/Cache/ICacheEntry.php b/lib/public/Files/Cache/ICacheEntry.php index e1e8129394c..581d5aa6731 100644 --- a/lib/public/Files/Cache/ICacheEntry.php +++ b/lib/public/Files/Cache/ICacheEntry.php @@ -28,12 +28,16 @@ use ArrayAccess; * meta data for a file or folder * * @since 9.0.0 + * @template-extends ArrayAccess<string,mixed> * * This interface extends \ArrayAccess since v21.0.0, previous versions only * implemented it in the private implementation. Hence php would allow using the * object as array, while strictly speaking it didn't support this. */ interface ICacheEntry extends ArrayAccess { + /** + * @since 9.0.0 + */ public const DIRECTORY_MIMETYPE = 'httpd/unix-directory'; /** @@ -123,8 +127,8 @@ interface ICacheEntry extends ArrayAccess { public function getEtag(); /** - * Get the permissions for the file stored as bitwise combination of \OCP\PERMISSION_READ, \OCP\PERMISSION_CREATE - * \OCP\PERMISSION_UPDATE, \OCP\PERMISSION_DELETE and \OCP\PERMISSION_SHARE + * Get the permissions for the file stored as bitwise combination of \OCP\Constants::PERMISSION_READ, \OCP\Constants::PERMISSION_CREATE + * \OCP\Constants::PERMISSION_UPDATE, \OCP\Constants::PERMISSION_DELETE and \OCP\Constants::PERMISSION_SHARE * * @return int * @since 9.0.0 diff --git a/lib/public/Files/Cache/IScanner.php b/lib/public/Files/Cache/IScanner.php index 8a45bfa6de7..e6ee4ef435f 100644 --- a/lib/public/Files/Cache/IScanner.php +++ b/lib/public/Files/Cache/IScanner.php @@ -28,12 +28,34 @@ namespace OCP\Files\Cache; * @since 9.0.0 */ interface IScanner { + /** + * @since 9.0.0 + */ public const SCAN_RECURSIVE_INCOMPLETE = 2; // only recursive into not fully scanned folders + + /** + * @since 9.0.0 + */ public const SCAN_RECURSIVE = true; + + /** + * @since 9.0.0 + */ public const SCAN_SHALLOW = false; + /** + * @since 12.0.0 + */ public const REUSE_NONE = 0; + + /** + * @since 9.0.0 + */ public const REUSE_ETAG = 1; + + /** + * @since 9.0.0 + */ public const REUSE_SIZE = 2; /** diff --git a/lib/public/Files/Cache/IUpdater.php b/lib/public/Files/Cache/IUpdater.php index 5a776d4be7e..625bc91c5a7 100644 --- a/lib/public/Files/Cache/IUpdater.php +++ b/lib/public/Files/Cache/IUpdater.php @@ -53,7 +53,7 @@ interface IUpdater { * @param int $time * @since 9.0.0 */ - public function update($path, $time = null); + public function update($path, $time = null, ?int $sizeDifference = null); /** * Remove $path from the cache and update the size, etag and mtime of the parent folders diff --git a/lib/public/Files/Cache/IWatcher.php b/lib/public/Files/Cache/IWatcher.php index f70024247d5..eca09507167 100644 --- a/lib/public/Files/Cache/IWatcher.php +++ b/lib/public/Files/Cache/IWatcher.php @@ -28,8 +28,19 @@ namespace OCP\Files\Cache; * @since 9.0.0 */ interface IWatcher { + /** + * @since 9.0.0 + */ public const CHECK_NEVER = 0; // never check the underlying filesystem for updates + + /** + * @since 9.0.0 + */ public const CHECK_ONCE = 1; // check the underlying filesystem for updates once every request for each file + + /** + * @since 9.0.0 + */ public const CHECK_ALWAYS = 2; // always check the underlying filesystem for updates /** |