aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Files
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-02-14 20:48:27 +0100
committerJoas Schilling <coding@schilljs.com>2024-02-14 20:50:08 +0100
commit42be7a5d74d1cd4d8edc0ba52854f1bb73cd67d0 (patch)
tree85ec146d450a0aceaafbc926f94b32dff442af7a /lib/public/Files
parent887c061fc8de23848095d71b567a8ad413c7f9b3 (diff)
downloadnextcloud-server-42be7a5d74d1cd4d8edc0ba52854f1bb73cd67d0.tar.gz
nextcloud-server-42be7a5d74d1cd4d8edc0ba52854f1bb73cd67d0.zip
fix(OCP): Add since tag for all constants
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/Files')
-rw-r--r--lib/public/Files/Cache/ICache.php15
-rw-r--r--lib/public/Files/Cache/ICacheEntry.php3
-rw-r--r--lib/public/Files/Cache/IScanner.php22
-rw-r--r--lib/public/Files/Cache/IWatcher.php11
-rw-r--r--lib/public/Files/Notify/IChange.php15
-rw-r--r--lib/public/Files/Search/ISearchBinaryOperator.php11
-rw-r--r--lib/public/Files/Search/ISearchComparison.php34
-rw-r--r--lib/public/Files/Search/ISearchOrder.php7
-rw-r--r--lib/public/Files/Storage/INotifyStorage.php15
-rw-r--r--lib/public/Files/StorageNotAvailableException.php30
10 files changed, 162 insertions, 1 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 6b83d31d55c..581d5aa6731 100644
--- a/lib/public/Files/Cache/ICacheEntry.php
+++ b/lib/public/Files/Cache/ICacheEntry.php
@@ -35,6 +35,9 @@ use ArrayAccess;
* 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';
/**
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/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
/**
diff --git a/lib/public/Files/Notify/IChange.php b/lib/public/Files/Notify/IChange.php
index 2a4f806be46..d8fd61b1a47 100644
--- a/lib/public/Files/Notify/IChange.php
+++ b/lib/public/Files/Notify/IChange.php
@@ -29,9 +29,24 @@ namespace OCP\Files\Notify;
* @since 12.0.0
*/
interface IChange {
+ /**
+ * @since 12.0.0
+ */
public const ADDED = 1;
+
+ /**
+ * @since 12.0.0
+ */
public const REMOVED = 2;
+
+ /**
+ * @since 12.0.0
+ */
public const MODIFIED = 3;
+
+ /**
+ * @since 12.0.0
+ */
public const RENAMED = 4;
/**
diff --git a/lib/public/Files/Search/ISearchBinaryOperator.php b/lib/public/Files/Search/ISearchBinaryOperator.php
index 4b3bbfd21fc..6e088fd4c2c 100644
--- a/lib/public/Files/Search/ISearchBinaryOperator.php
+++ b/lib/public/Files/Search/ISearchBinaryOperator.php
@@ -27,8 +27,19 @@ namespace OCP\Files\Search;
* @since 12.0.0
*/
interface ISearchBinaryOperator extends ISearchOperator {
+ /**
+ * @since 12.0.0
+ */
public const OPERATOR_AND = 'and';
+
+ /**
+ * @since 12.0.0
+ */
public const OPERATOR_OR = 'or';
+
+ /**
+ * @since 12.0.0
+ */
public const OPERATOR_NOT = 'not';
/**
diff --git a/lib/public/Files/Search/ISearchComparison.php b/lib/public/Files/Search/ISearchComparison.php
index ba02f39996f..44657fd16bd 100644
--- a/lib/public/Files/Search/ISearchComparison.php
+++ b/lib/public/Files/Search/ISearchComparison.php
@@ -28,15 +28,49 @@ namespace OCP\Files\Search;
* @since 12.0.0
*/
interface ISearchComparison extends ISearchOperator {
+ /**
+ * @since 12.0.0
+ */
public const COMPARE_EQUAL = 'eq';
+
+ /**
+ * @since 12.0.0
+ */
public const COMPARE_GREATER_THAN = 'gt';
+
+ /**
+ * @since 12.0.0
+ */
public const COMPARE_GREATER_THAN_EQUAL = 'gte';
+
+ /**
+ * @since 12.0.0
+ */
public const COMPARE_LESS_THAN = 'lt';
+
+ /**
+ * @since 12.0.0
+ */
public const COMPARE_LESS_THAN_EQUAL = 'lte';
+
+ /**
+ * @since 12.0.0
+ */
public const COMPARE_LIKE = 'like';
+
+ /**
+ * @since 23.0.0
+ */
public const COMPARE_LIKE_CASE_SENSITIVE = 'clike';
+
+ /**
+ * @since 28.0.0
+ */
public const COMPARE_DEFINED = 'is-defined';
+ /**
+ * @since 23.0.0
+ */
public const HINT_PATH_EQ_HASH = 'path_eq_hash'; // transform `path = "$path"` into `path_hash = md5("$path")`, on by default
/**
diff --git a/lib/public/Files/Search/ISearchOrder.php b/lib/public/Files/Search/ISearchOrder.php
index 5b73e7b102c..978668907ad 100644
--- a/lib/public/Files/Search/ISearchOrder.php
+++ b/lib/public/Files/Search/ISearchOrder.php
@@ -30,7 +30,14 @@ use OCP\Files\FileInfo;
* @since 12.0.0
*/
interface ISearchOrder {
+ /**
+ * @since 12.0.0
+ */
public const DIRECTION_ASCENDING = 'asc';
+
+ /**
+ * @since 12.0.0
+ */
public const DIRECTION_DESCENDING = 'desc';
/**
diff --git a/lib/public/Files/Storage/INotifyStorage.php b/lib/public/Files/Storage/INotifyStorage.php
index 18bcf3c6adc..6b1dacc564a 100644
--- a/lib/public/Files/Storage/INotifyStorage.php
+++ b/lib/public/Files/Storage/INotifyStorage.php
@@ -31,9 +31,24 @@ use OCP\Files\Notify\INotifyHandler;
* @since 9.1.0
*/
interface INotifyStorage {
+ /**
+ * @since 9.1.0
+ */
public const NOTIFY_ADDED = 1;
+
+ /**
+ * @since 9.1.0
+ */
public const NOTIFY_REMOVED = 2;
+
+ /**
+ * @since 9.1.0
+ */
public const NOTIFY_MODIFIED = 3;
+
+ /**
+ * @since 9.1.0
+ */
public const NOTIFY_RENAMED = 4;
/**
diff --git a/lib/public/Files/StorageNotAvailableException.php b/lib/public/Files/StorageNotAvailableException.php
index c205d6b9c44..78b004f8518 100644
--- a/lib/public/Files/StorageNotAvailableException.php
+++ b/lib/public/Files/StorageNotAvailableException.php
@@ -36,15 +36,43 @@ use OCP\HintException;
/**
* Storage is temporarily not available
- * @since 6.0.0 - since 8.2.1 based on HintException
+ * @since 6.0.0
+ * @since 8.2.1 based on HintException
*/
class StorageNotAvailableException extends HintException {
+ /**
+ * @since 8.2.0
+ */
public const STATUS_SUCCESS = 0;
+
+ /**
+ * @since 8.2.0
+ */
public const STATUS_ERROR = 1;
+
+ /**
+ * @since 8.2.0
+ */
public const STATUS_INDETERMINATE = 2;
+
+ /**
+ * @since 8.2.0
+ */
public const STATUS_INCOMPLETE_CONF = 3;
+
+ /**
+ * @since 8.2.0
+ */
public const STATUS_UNAUTHORIZED = 4;
+
+ /**
+ * @since 8.2.0
+ */
public const STATUS_TIMEOUT = 5;
+
+ /**
+ * @since 8.2.0
+ */
public const STATUS_NETWORK_ERROR = 6;
/**