summaryrefslogtreecommitdiffstats
path: root/lib/public/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-16 17:00:08 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-16 17:00:08 +0200
commit7644950b48b094bfe5675348aefb7cf5747d325b (patch)
treea1792e21239a86f471da99b454134a5d8533ef77 /lib/public/files
parent8653da6c16597959c7bd0f0b202747ff96204575 (diff)
downloadnextcloud-server-7644950b48b094bfe5675348aefb7cf5747d325b.tar.gz
nextcloud-server-7644950b48b094bfe5675348aefb7cf5747d325b.zip
Add @since tags to all methods in public namespace
* enhance the app development experience - you can look up the method introduction right inside the code without searching via git blame * easier to write apps for multiple versions
Diffstat (limited to 'lib/public/files')
-rw-r--r--lib/public/files/alreadyexistsexception.php1
-rw-r--r--lib/public/files/config/imountprovider.php2
-rw-r--r--lib/public/files/config/imountprovidercollection.php3
-rw-r--r--lib/public/files/entitytoolargeexception.php1
-rw-r--r--lib/public/files/file.php11
-rw-r--r--lib/public/files/fileinfo.php42
-rw-r--r--lib/public/files/filenametoolongexception.php7
-rw-r--r--lib/public/files/folder.php17
-rw-r--r--lib/public/files/ihomestorage.php6
-rw-r--r--lib/public/files/invalidcharacterinpathexception.php1
-rw-r--r--lib/public/files/invalidcontentexception.php1
-rw-r--r--lib/public/files/invalidpathexception.php1
-rw-r--r--lib/public/files/irootfolder.php7
-rw-r--r--lib/public/files/locknotacquiredexception.php1
-rw-r--r--lib/public/files/mount/imountpoint.php9
-rw-r--r--lib/public/files/node.php25
-rw-r--r--lib/public/files/notenoughspaceexception.php1
-rw-r--r--lib/public/files/notfoundexception.php1
-rw-r--r--lib/public/files/notpermittedexception.php1
-rw-r--r--lib/public/files/objectstore/iobjectstore.php18
-rw-r--r--lib/public/files/reservedwordexception.php1
-rw-r--r--lib/public/files/storage.php40
-rw-r--r--lib/public/files/storage/istoragefactory.php3
-rw-r--r--lib/public/files/storageinvalidexception.php1
-rw-r--r--lib/public/files/storagenotavailableexception.php1
25 files changed, 193 insertions, 9 deletions
diff --git a/lib/public/files/alreadyexistsexception.php b/lib/public/files/alreadyexistsexception.php
index 0709a6bf94c..2ff231c56f4 100644
--- a/lib/public/files/alreadyexistsexception.php
+++ b/lib/public/files/alreadyexistsexception.php
@@ -31,5 +31,6 @@ namespace OCP\Files;
/**
* Exception for already existing files/folders
+ * @since 6.0.0
*/
class AlreadyExistsException extends \Exception {}
diff --git a/lib/public/files/config/imountprovider.php b/lib/public/files/config/imountprovider.php
index 01d71618aa6..8e21e4c8650 100644
--- a/lib/public/files/config/imountprovider.php
+++ b/lib/public/files/config/imountprovider.php
@@ -27,6 +27,7 @@ use OCP\IUser;
/**
* Provides
+ * @since 8.0.0
*/
interface IMountProvider {
/**
@@ -35,6 +36,7 @@ interface IMountProvider {
* @param \OCP\IUser $user
* @param \OCP\Files\Storage\IStorageFactory $loader
* @return \OCP\Files\Mount\IMountPoint[]
+ * @since 8.0.0
*/
public function getMountsForUser(IUser $user, IStorageFactory $loader);
}
diff --git a/lib/public/files/config/imountprovidercollection.php b/lib/public/files/config/imountprovidercollection.php
index 467aa05b8a2..a458cbf3ce7 100644
--- a/lib/public/files/config/imountprovidercollection.php
+++ b/lib/public/files/config/imountprovidercollection.php
@@ -26,6 +26,7 @@ use OCP\IUser;
/**
* Manages the different mount providers
+ * @since 8.0.0
*/
interface IMountProviderCollection {
/**
@@ -33,6 +34,7 @@ interface IMountProviderCollection {
*
* @param \OCP\IUser $user
* @return \OCP\Files\Mount\IMountPoint[]
+ * @since 8.0.0
*/
public function getMountsForUser(IUser $user);
@@ -40,6 +42,7 @@ interface IMountProviderCollection {
* Add a provider for mount points
*
* @param \OCP\Files\Config\IMountProvider $provider
+ * @since 8.0.0
*/
public function registerProvider(IMountProvider $provider);
}
diff --git a/lib/public/files/entitytoolargeexception.php b/lib/public/files/entitytoolargeexception.php
index 770d1153876..4dcfa77728b 100644
--- a/lib/public/files/entitytoolargeexception.php
+++ b/lib/public/files/entitytoolargeexception.php
@@ -31,5 +31,6 @@ namespace OCP\Files;
/**
* Exception for too large entity
+ * @since 6.0.0
*/
class EntityTooLargeException extends \Exception {}
diff --git a/lib/public/files/file.php b/lib/public/files/file.php
index 69e6e510c8f..839d646edb1 100644
--- a/lib/public/files/file.php
+++ b/lib/public/files/file.php
@@ -30,12 +30,19 @@
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
+/**
+ * Interface File
+ *
+ * @package OCP\Files
+ * @since 6.0.0
+ */
interface File extends Node {
/**
* Get the content of the file as string
*
* @return string
* @throws \OCP\Files\NotPermittedException
+ * @since 6.0.0
*/
public function getContent();
@@ -45,6 +52,7 @@ interface File extends Node {
* @param string $data
* @throws \OCP\Files\NotPermittedException
* @return void
+ * @since 6.0.0
*/
public function putContent($data);
@@ -52,6 +60,7 @@ interface File extends Node {
* Get the mimetype of the file
*
* @return string
+ * @since 6.0.0
*/
public function getMimeType();
@@ -61,6 +70,7 @@ interface File extends Node {
* @param string $mode
* @return resource
* @throws \OCP\Files\NotPermittedException
+ * @since 6.0.0
*/
public function fopen($mode);
@@ -71,6 +81,7 @@ interface File extends Node {
* @param string $type
* @param bool $raw
* @return string
+ * @since 6.0.0
*/
public function hash($type, $raw = false);
}
diff --git a/lib/public/files/fileinfo.php b/lib/public/files/fileinfo.php
index 69bca284cc5..accbe04e044 100644
--- a/lib/public/files/fileinfo.php
+++ b/lib/public/files/fileinfo.php
@@ -24,20 +24,35 @@
*/
namespace OCP\Files;
+/**
+ * Interface FileInfo
+ *
+ * @package OCP\Files
+ * @since 7.0.0
+ */
interface FileInfo {
+ /**
+ * @since 7.0.0
+ */
const TYPE_FILE = 'file';
+ /**
+ * @since 7.0.0
+ */
const TYPE_FOLDER = 'dir';
- /*
+ /**
* @const \OCP\Files\FileInfo::SPACE_NOT_COMPUTED Return value for a not computed space value
+ * @since 8.0.0
*/
const SPACE_NOT_COMPUTED = -1;
- /*
+ /**
* @const \OCP\Files\FileInfo::SPACE_UNKNOWN Return value for unknown space value
+ * @since 8.0.0
*/
const SPACE_UNKNOWN = -2;
- /*
+ /**
* @const \OCP\Files\FileInfo::SPACE_UNKNOWN Return value for unlimited space
+ * @since 8.0.0
*/
const SPACE_UNLIMITED = -3;
@@ -45,6 +60,7 @@ interface FileInfo {
* Get the Etag of the file or folder
*
* @return string
+ * @since 7.0.0
*/
public function getEtag();
@@ -52,6 +68,7 @@ interface FileInfo {
* Get the size in bytes for the file or folder
*
* @return int
+ * @since 7.0.0
*/
public function getSize();
@@ -59,6 +76,7 @@ interface FileInfo {
* Get the last modified date as timestamp for the file or folder
*
* @return int
+ * @since 7.0.0
*/
public function getMtime();
@@ -66,6 +84,7 @@ interface FileInfo {
* Get the name of the file or folder
*
* @return string
+ * @since 7.0.0
*/
public function getName();
@@ -73,6 +92,7 @@ interface FileInfo {
* Get the path relative to the storage
*
* @return string
+ * @since 7.0.0
*/
public function getInternalPath();
@@ -80,6 +100,7 @@ interface FileInfo {
* Get the absolute path
*
* @return string
+ * @since 7.0.0
*/
public function getPath();
@@ -87,6 +108,7 @@ interface FileInfo {
* Get the full mimetype of the file or folder i.e. 'image/png'
*
* @return string
+ * @since 7.0.0
*/
public function getMimetype();
@@ -94,6 +116,7 @@ interface FileInfo {
* Get the first part of the mimetype of the file or folder i.e. 'image'
*
* @return string
+ * @since 7.0.0
*/
public function getMimePart();
@@ -101,6 +124,7 @@ interface FileInfo {
* Get the storage the file or folder is storage on
*
* @return \OCP\Files\Storage
+ * @since 7.0.0
*/
public function getStorage();
@@ -108,6 +132,7 @@ interface FileInfo {
* Get the file id of the file or folder
*
* @return int
+ * @since 7.0.0
*/
public function getId();
@@ -115,6 +140,7 @@ interface FileInfo {
* Check whether the file is encrypted
*
* @return bool
+ * @since 7.0.0
*/
public function isEncrypted();
@@ -128,6 +154,7 @@ interface FileInfo {
* \OCP\Constants::PERMISSION_ALL
*
* @return int
+ * @since 7.0.0 - namespace of constants has changed in 8.0.0
*/
public function getPermissions();
@@ -135,6 +162,7 @@ interface FileInfo {
* Check whether this is a file or a folder
*
* @return \OCP\Files\FileInfo::TYPE_FILE|\OCP\Files\FileInfo::TYPE_FOLDER
+ * @since 7.0.0
*/
public function getType();
@@ -142,6 +170,7 @@ interface FileInfo {
* Check if the file or folder is readable
*
* @return bool
+ * @since 7.0.0
*/
public function isReadable();
@@ -149,6 +178,7 @@ interface FileInfo {
* Check if a file is writable
*
* @return bool
+ * @since 7.0.0
*/
public function isUpdateable();
@@ -156,6 +186,7 @@ interface FileInfo {
* Check whether new files or folders can be created inside this folder
*
* @return bool
+ * @since 8.0.0
*/
public function isCreatable();
@@ -163,6 +194,7 @@ interface FileInfo {
* Check if a file or folder can be deleted
*
* @return bool
+ * @since 7.0.0
*/
public function isDeletable();
@@ -170,6 +202,7 @@ interface FileInfo {
* Check if a file or folder can be shared
*
* @return bool
+ * @since 7.0.0
*/
public function isShareable();
@@ -177,6 +210,7 @@ interface FileInfo {
* Check if a file or folder is shared
*
* @return bool
+ * @since 7.0.0
*/
public function isShared();
@@ -184,6 +218,7 @@ interface FileInfo {
* Check if a file or folder is mounted
*
* @return bool
+ * @since 7.0.0
*/
public function isMounted();
@@ -191,6 +226,7 @@ interface FileInfo {
* Get the mountpoint the file belongs to
*
* @return \OCP\Files\Mount\IMountPoint
+ * @since 8.0.0
*/
public function getMountPoint();
}
diff --git a/lib/public/files/filenametoolongexception.php b/lib/public/files/filenametoolongexception.php
index 260a749f3ac..ccf56e19a6b 100644
--- a/lib/public/files/filenametoolongexception.php
+++ b/lib/public/files/filenametoolongexception.php
@@ -28,6 +28,11 @@
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
-
+/**
+ * Class FileNameTooLongException
+ *
+ * @package OCP\Files
+ * @since 8.1.0
+ */
class FileNameTooLongException extends InvalidPathException {
}
diff --git a/lib/public/files/folder.php b/lib/public/files/folder.php
index 7082d917cf4..f5f91e8158c 100644
--- a/lib/public/files/folder.php
+++ b/lib/public/files/folder.php
@@ -30,6 +30,9 @@
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
+/**
+ * @since 6.0.0
+ */
interface Folder extends Node {
/**
* Get the full path of an item in the folder within owncloud's filesystem
@@ -37,6 +40,7 @@ interface Folder extends Node {
* @param string $path relative path of an item in the folder
* @return string
* @throws \OCP\Files\NotPermittedException
+ * @since 6.0.0
*/
public function getFullPath($path);
@@ -46,6 +50,7 @@ interface Folder extends Node {
* @param string $path absolute path of an item in the folder
* @throws \OCP\Files\NotFoundException
* @return string
+ * @since 6.0.0
*/
public function getRelativePath($path);
@@ -54,6 +59,7 @@ interface Folder extends Node {
*
* @param \OCP\Files\Node $node
* @return bool
+ * @since 6.0.0
*/
public function isSubNode($node);
@@ -62,6 +68,7 @@ interface Folder extends Node {
*
* @throws \OCP\Files\NotFoundException
* @return \OCP\Files\Node[]
+ * @since 6.0.0
*/
public function getDirectoryListing();
@@ -71,6 +78,7 @@ interface Folder extends Node {
* @param string $path relative path of the file or folder
* @return \OCP\Files\Node
* @throws \OCP\Files\NotFoundException
+ * @since 6.0.0
*/
public function get($path);
@@ -79,6 +87,7 @@ interface Folder extends Node {
*
* @param string $path relative path of the file or folder
* @return bool
+ * @since 6.0.0
*/
public function nodeExists($path);
@@ -88,6 +97,7 @@ interface Folder extends Node {
* @param string $path relative path of the new folder
* @return \OCP\Files\Folder
* @throws \OCP\Files\NotPermittedException
+ * @since 6.0.0
*/
public function newFolder($path);
@@ -105,6 +115,7 @@ interface Folder extends Node {
*
* @param string $query
* @return \OCP\Files\Node[]
+ * @since 6.0.0
*/
public function search($query);
@@ -114,6 +125,7 @@ interface Folder extends Node {
*
* @param string $mimetype
* @return \OCP\Files\Node[]
+ * @since 6.0.0
*/
public function searchByMime($mimetype);
@@ -123,6 +135,7 @@ interface Folder extends Node {
* @param string|int $tag tag name or tag id
* @param string $userId owner of the tags
* @return \OCP\Files\Node[]
+ * @since 8.0.0
*/
public function searchByTag($tag, $userId);
@@ -131,6 +144,7 @@ interface Folder extends Node {
*
* @param int $id
* @return \OCP\Files\Node[]
+ * @since 6.0.0
*/
public function getById($id);
@@ -138,6 +152,7 @@ interface Folder extends Node {
* Get the amount of free space inside the folder
*
* @return int
+ * @since 6.0.0
*/
public function getFreeSpace();
@@ -145,6 +160,7 @@ interface Folder extends Node {
* Check if new files or folders can be created within the folder
*
* @return bool
+ * @since 6.0.0
*/
public function isCreatable();
@@ -154,6 +170,7 @@ interface Folder extends Node {
* @param string $name
* @return string
* @throws NotPermittedException
+ * @since 8.1.0
*/
public function getNonExistingName($name);
}
diff --git a/lib/public/files/ihomestorage.php b/lib/public/files/ihomestorage.php
index b9766e6f4c2..fc9b0357578 100644
--- a/lib/public/files/ihomestorage.php
+++ b/lib/public/files/ihomestorage.php
@@ -29,6 +29,12 @@
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
+/**
+ * Interface IHomeStorage
+ *
+ * @package OCP\Files
+ * @since 7.0.0
+ */
interface IHomeStorage {
}
diff --git a/lib/public/files/invalidcharacterinpathexception.php b/lib/public/files/invalidcharacterinpathexception.php
index 0ac79a3b8ae..a25712353b6 100644
--- a/lib/public/files/invalidcharacterinpathexception.php
+++ b/lib/public/files/invalidcharacterinpathexception.php
@@ -30,6 +30,7 @@ namespace OCP\Files;
/**
* Exception for invalid path
+ * @since 8.1.0
*/
class InvalidCharacterInPathException extends InvalidPathException {
diff --git a/lib/public/files/invalidcontentexception.php b/lib/public/files/invalidcontentexception.php
index d02118da8a2..6aebf367241 100644
--- a/lib/public/files/invalidcontentexception.php
+++ b/lib/public/files/invalidcontentexception.php
@@ -31,5 +31,6 @@ namespace OCP\Files;
/**
* Exception for invalid content
+ * @since 6.0.0
*/
class InvalidContentException extends \Exception {}
diff --git a/lib/public/files/invalidpathexception.php b/lib/public/files/invalidpathexception.php
index 06ea5cd872a..e86d58bde7a 100644
--- a/lib/public/files/invalidpathexception.php
+++ b/lib/public/files/invalidpathexception.php
@@ -31,5 +31,6 @@ namespace OCP\Files;
/**
* Exception for invalid path
+ * @since 6.0.0
*/
class InvalidPathException extends \Exception {}
diff --git a/lib/public/files/irootfolder.php b/lib/public/files/irootfolder.php
index cbea0c0979b..19192cd9cc9 100644
--- a/lib/public/files/irootfolder.php
+++ b/lib/public/files/irootfolder.php
@@ -25,7 +25,12 @@ namespace OCP\Files;
use OC\Hooks\Emitter;
-
+/**
+ * Interface IRootFolder
+ *
+ * @package OCP\Files
+ * @since 8.0.0
+ */
interface IRootFolder extends Folder, Emitter {
}
diff --git a/lib/public/files/locknotacquiredexception.php b/lib/public/files/locknotacquiredexception.php
index aa8e7e97d89..66e131ab1e5 100644
--- a/lib/public/files/locknotacquiredexception.php
+++ b/lib/public/files/locknotacquiredexception.php
@@ -32,6 +32,7 @@ namespace OCP\Files;
/**
* Exception for a file that is locked
+ * @since 7.0.0
*/
class LockNotAcquiredException extends \Exception {
/** @var string $path The path that could not be locked */
diff --git a/lib/public/files/mount/imountpoint.php b/lib/public/files/mount/imountpoint.php
index 50126e1fcf0..5452bcdb03a 100644
--- a/lib/public/files/mount/imountpoint.php
+++ b/lib/public/files/mount/imountpoint.php
@@ -24,6 +24,7 @@ namespace OCP\Files\Mount;
/**
* A storage mounted to folder on the filesystem
+ * @since 8.0.0
*/
interface IMountPoint {
@@ -31,6 +32,7 @@ interface IMountPoint {
* get complete path to the mount point
*
* @return string
+ * @since 8.0.0
*/
public function getMountPoint();
@@ -38,6 +40,7 @@ interface IMountPoint {
* Set the mountpoint
*
* @param string $mountPoint new mount point
+ * @since 8.0.0
*/
public function setMountPoint($mountPoint);
@@ -45,6 +48,7 @@ interface IMountPoint {
* Get the storage that is mounted
*
* @return \OC\Files\Storage\Storage
+ * @since 8.0.0
*/
public function getStorage();
@@ -52,6 +56,7 @@ interface IMountPoint {
* Get the id of the storages
*
* @return string
+ * @since 8.0.0
*/
public function getStorageId();
@@ -60,6 +65,7 @@ interface IMountPoint {
*
* @param string $path absolute path to a file or folder
* @return string
+ * @since 8.0.0
*/
public function getInternalPath($path);
@@ -67,6 +73,7 @@ interface IMountPoint {
* Apply a storage wrapper to the mounted storage
*
* @param callable $wrapper
+ * @since 8.0.0
*/
public function wrapStorage($wrapper);
@@ -76,6 +83,7 @@ interface IMountPoint {
* @param string $name Name of the mount option to get
* @param mixed $default Default value for the mount option
* @return mixed
+ * @since 8.0.0
*/
public function getOption($name, $default);
@@ -83,6 +91,7 @@ interface IMountPoint {
* Get all options for the mount
*
* @return array
+ * @since 8.1.0
*/
public function getOptions();
}
diff --git a/lib/public/files/node.php b/lib/public/files/node.php
index 6739d8cc391..aa1115f8c28 100644
--- a/lib/public/files/node.php
+++ b/lib/public/files/node.php
@@ -32,6 +32,12 @@
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
+/**
+ * Interface Node
+ *
+ * @package OCP\Files
+ * @since 6.0.0 - extends FileInfo was added in 8.0.0
+ */
interface Node extends FileInfo {
/**
* Move the file or folder to a new location
@@ -39,12 +45,14 @@ interface Node extends FileInfo {
* @param string $targetPath the absolute target path
* @throws \OCP\Files\NotPermittedException
* @return \OCP\Files\Node
+ * @since 6.0.0
*/
public function move($targetPath);
/**
* Delete the file or folder
* @return void
+ * @since 6.0.0
*/
public function delete();
@@ -53,6 +61,7 @@ interface Node extends FileInfo {
*
* @param string $targetPath the absolute target path
* @return \OCP\Files\Node
+ * @since 6.0.0
*/
public function copy($targetPath);
@@ -63,6 +72,7 @@ interface Node extends FileInfo {
* @param int $mtime (optional) modified date as unix timestamp
* @throws \OCP\Files\NotPermittedException
* @return void
+ * @since 6.0.0
*/
public function touch($mtime = null);
@@ -71,6 +81,7 @@ interface Node extends FileInfo {
*
* @return \OCP\Files\Storage
* @throws \OCP\Files\NotFoundException
+ * @since 6.0.0
*/
public function getStorage();
@@ -78,6 +89,7 @@ interface Node extends FileInfo {
* Get the full path of the file or folder
*
* @return string
+ * @since 6.0.0
*/
public function getPath();
@@ -85,6 +97,7 @@ interface Node extends FileInfo {
* Get the path of the file or folder relative to the mountpoint of it's storage
*
* @return string
+ * @since 6.0.0
*/
public function getInternalPath();
@@ -94,6 +107,7 @@ interface Node extends FileInfo {
* @return int
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0
*/
public function getId();
@@ -104,6 +118,7 @@ interface Node extends FileInfo {
* - size
*
* @return array
+ * @since 6.0.0
*/
public function stat();
@@ -113,6 +128,7 @@ interface Node extends FileInfo {
* @return int
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0
*/
public function getMTime();
@@ -122,6 +138,7 @@ interface Node extends FileInfo {
* @return int
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0
*/
public function getSize();
@@ -133,6 +150,7 @@ interface Node extends FileInfo {
* @return string
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0
*/
public function getEtag();
@@ -148,6 +166,7 @@ interface Node extends FileInfo {
* @return int
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0 - namespace of constants has changed in 8.0.0
*/
public function getPermissions();
@@ -157,6 +176,7 @@ interface Node extends FileInfo {
* @return bool
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0
*/
public function isReadable();
@@ -166,6 +186,7 @@ interface Node extends FileInfo {
* @return bool
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0
*/
public function isUpdateable();
@@ -175,6 +196,7 @@ interface Node extends FileInfo {
* @return bool
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0
*/
public function isDeletable();
@@ -184,6 +206,7 @@ interface Node extends FileInfo {
* @return bool
* @throws InvalidPathException
* @throws NotFoundException
+ * @since 6.0.0
*/
public function isShareable();
@@ -191,6 +214,7 @@ interface Node extends FileInfo {
* Get the parent folder of the file or folder
*
* @return Folder
+ * @since 6.0.0
*/
public function getParent();
@@ -198,6 +222,7 @@ interface Node extends FileInfo {
* Get the filename of the file or folder
*
* @return string
+ * @since 6.0.0
*/
public function getName();
}
diff --git a/lib/public/files/notenoughspaceexception.php b/lib/public/files/notenoughspaceexception.php
index d79caff6872..a2cc0d6956b 100644
--- a/lib/public/files/notenoughspaceexception.php
+++ b/lib/public/files/notenoughspaceexception.php
@@ -31,5 +31,6 @@ namespace OCP\Files;
/**
* Exception for not enough space
+ * @since 6.0.0
*/
class NotEnoughSpaceException extends \Exception {}
diff --git a/lib/public/files/notfoundexception.php b/lib/public/files/notfoundexception.php
index 13aa04c57dc..ae93e8d1e6d 100644
--- a/lib/public/files/notfoundexception.php
+++ b/lib/public/files/notfoundexception.php
@@ -31,5 +31,6 @@ namespace OCP\Files;
/**
* Exception for not found entity
+ * @since 6.0.0
*/
class NotFoundException extends \Exception {}
diff --git a/lib/public/files/notpermittedexception.php b/lib/public/files/notpermittedexception.php
index 6f2475a174f..ee82ae56e51 100644
--- a/lib/public/files/notpermittedexception.php
+++ b/lib/public/files/notpermittedexception.php
@@ -31,5 +31,6 @@ namespace OCP\Files;
/**
* Exception for not permitted action
+ * @since 6.0.0
*/
class NotPermittedException extends \Exception {}
diff --git a/lib/public/files/objectstore/iobjectstore.php b/lib/public/files/objectstore/iobjectstore.php
index 0eeecc1204d..5943731849e 100644
--- a/lib/public/files/objectstore/iobjectstore.php
+++ b/lib/public/files/objectstore/iobjectstore.php
@@ -21,32 +21,42 @@
*/
namespace OCP\Files\ObjectStore;
+/**
+ * Interface IObjectStore
+ *
+ * @package OCP\Files\ObjectStore
+ * @since 7.0.0
+ */
interface IObjectStore {
/**
* @return string the container or bucket name where objects are stored
+ * @since 7.0.0
*/
function getStorageId();
/**
* @param string $urn the unified resource name used to identify the object
* @return resource stream with the read data
- * @throws Exception when something goes wrong, message will be logged
+ * @throws \Exception when something goes wrong, message will be logged
+ * @since 7.0.0
*/
function readObject($urn);
/**
* @param string $urn the unified resource name used to identify the object
* @param resource $stream stream with the data to write
- * @throws Exception when something goes wrong, message will be logged
+ * @throws \Exception when something goes wrong, message will be logged
+ * @since 7.0.0
*/
function writeObject($urn, $stream);
/**
* @param string $urn the unified resource name used to identify the object
* @return void
- * @throws Exception when something goes wrong, message will be logged
+ * @throws \Exception when something goes wrong, message will be logged
+ * @since 7.0.0
*/
function deleteObject($urn);
-} \ No newline at end of file
+}
diff --git a/lib/public/files/reservedwordexception.php b/lib/public/files/reservedwordexception.php
index 15527a86f69..0fda9841194 100644
--- a/lib/public/files/reservedwordexception.php
+++ b/lib/public/files/reservedwordexception.php
@@ -30,6 +30,7 @@ namespace OCP\Files;
/**
* Exception for invalid path
+ * @since 8.1.0
*/
class ReservedWordException extends InvalidPathException {
diff --git a/lib/public/files/storage.php b/lib/public/files/storage.php
index bac2c95ebce..17e09af9832 100644
--- a/lib/public/files/storage.php
+++ b/lib/public/files/storage.php
@@ -38,6 +38,7 @@ use OCP\Files\InvalidPathException;
* 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.
+ * @since 6.0.0
*/
interface Storage {
/**
@@ -45,6 +46,7 @@ interface Storage {
*
* @param array $parameters
* @return void
+ * @since 6.0.0
*/
public function __construct($parameters);
@@ -54,6 +56,7 @@ interface Storage {
* and two storage objects with the same id should refer to two storages that display the same files.
*
* @return string
+ * @since 6.0.0
*/
public function getId();
@@ -62,6 +65,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function mkdir($path);
@@ -70,6 +74,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function rmdir($path);
@@ -78,6 +83,7 @@ interface Storage {
*
* @param string $path
* @return resource|false
+ * @since 6.0.0
*/
public function opendir($path);
@@ -86,6 +92,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function is_dir($path);
@@ -94,6 +101,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function is_file($path);
@@ -103,6 +111,7 @@ interface Storage {
*
* @param string $path
* @return array|false
+ * @since 6.0.0
*/
public function stat($path);
@@ -111,6 +120,7 @@ interface Storage {
*
* @param string $path
* @return string|false
+ * @since 6.0.0
*/
public function filetype($path);
@@ -120,6 +130,7 @@ interface Storage {
*
* @param string $path
* @return int|false
+ * @since 6.0.0
*/
public function filesize($path);
@@ -128,6 +139,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function isCreatable($path);
@@ -136,6 +148,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function isReadable($path);
@@ -144,6 +157,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function isUpdatable($path);
@@ -152,6 +166,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function isDeletable($path);
@@ -160,6 +175,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function isSharable($path);
@@ -169,6 +185,7 @@ interface Storage {
*
* @param string $path
* @return int
+ * @since 6.0.0
*/
public function getPermissions($path);
@@ -177,6 +194,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function file_exists($path);
@@ -185,6 +203,7 @@ interface Storage {
*
* @param string $path
* @return int|false
+ * @since 6.0.0
*/
public function filemtime($path);
@@ -193,6 +212,7 @@ interface Storage {
*
* @param string $path
* @return string|false
+ * @since 6.0.0
*/
public function file_get_contents($path);
@@ -202,6 +222,7 @@ interface Storage {
* @param string $path
* @param string $data
* @return bool
+ * @since 6.0.0
*/
public function file_put_contents($path, $data);
@@ -210,6 +231,7 @@ interface Storage {
*
* @param string $path
* @return bool
+ * @since 6.0.0
*/
public function unlink($path);
@@ -219,6 +241,7 @@ interface Storage {
* @param string $path1
* @param string $path2
* @return bool
+ * @since 6.0.0
*/
public function rename($path1, $path2);
@@ -228,6 +251,7 @@ interface Storage {
* @param string $path1
* @param string $path2
* @return bool
+ * @since 6.0.0
*/
public function copy($path1, $path2);
@@ -237,6 +261,7 @@ interface Storage {
* @param string $path
* @param string $mode
* @return resource|false
+ * @since 6.0.0
*/
public function fopen($path, $mode);
@@ -246,6 +271,7 @@ interface Storage {
*
* @param string $path
* @return string|false
+ * @since 6.0.0
*/
public function getMimeType($path);
@@ -256,6 +282,7 @@ interface Storage {
* @param string $path
* @param bool $raw
* @return string|false
+ * @since 6.0.0
*/
public function hash($type, $path, $raw = false);
@@ -264,6 +291,7 @@ interface Storage {
*
* @param string $path
* @return int|false
+ * @since 6.0.0
*/
public function free_space($path);
@@ -272,6 +300,7 @@ interface Storage {
*
* @param string $query
* @return array|false
+ * @since 6.0.0
*/
public function search($query);
@@ -282,6 +311,7 @@ interface Storage {
* @param string $path
* @param int $mtime
* @return bool
+ * @since 6.0.0
*/
public function touch($path, $mtime = null);
@@ -291,6 +321,7 @@ interface Storage {
*
* @param string $path
* @return string|false
+ * @since 6.0.0
*/
public function getLocalFile($path);
@@ -300,6 +331,7 @@ interface Storage {
*
* @param string $path
* @return string|false
+ * @since 6.0.0
*/
public function getLocalFolder($path);
/**
@@ -308,6 +340,7 @@ interface Storage {
* @param string $path
* @param int $time
* @return bool
+ * @since 6.0.0
*
* hasUpdated for folders should return at least true if a file inside the folder is add, removed or renamed.
* returning true for other changes in the folder is optional
@@ -319,6 +352,7 @@ interface Storage {
*
* @param string $path
* @return string|false
+ * @since 6.0.0
*/
public function getETag($path);
@@ -330,6 +364,7 @@ interface Storage {
* it might return a temporary file.
*
* @return bool true if the files are stored locally, false otherwise
+ * @since 7.0.0
*/
public function isLocal();
@@ -338,6 +373,7 @@ interface Storage {
*
* @param string $class
* @return bool
+ * @since 7.0.0
*/
public function instanceOfStorage($class);
@@ -348,6 +384,7 @@ interface Storage {
*
* @param string $path
* @return array|false
+ * @since 8.0.0
*/
public function getDirectDownload($path);
@@ -356,6 +393,7 @@ interface Storage {
* @param string $fileName the name of the file itself
* @return void
* @throws InvalidPathException
+ * @since 8.1.0
*/
public function verifyPath($path, $fileName);
@@ -364,6 +402,7 @@ interface Storage {
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
+ * @since 8.1.0
*/
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath);
@@ -372,6 +411,7 @@ interface Storage {
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
+ * @since 8.1.0
*/
public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath);
}
diff --git a/lib/public/files/storage/istoragefactory.php b/lib/public/files/storage/istoragefactory.php
index e7827297f03..bd9651299cf 100644
--- a/lib/public/files/storage/istoragefactory.php
+++ b/lib/public/files/storage/istoragefactory.php
@@ -26,6 +26,7 @@ use OCP\Files\Mount\IMountPoint;
/**
* Creates storage instances and manages and applies storage wrappers
+ * @since 8.0.0
*/
interface IStorageFactory {
/**
@@ -37,6 +38,7 @@ interface IStorageFactory {
* @param callable $callback
* @return bool true if the wrapper was added, false if there was already a wrapper with this
* name registered
+ * @since 8.0.0
*/
public function addStorageWrapper($wrapperName, $callback);
@@ -45,6 +47,7 @@ interface IStorageFactory {
* @param string $class
* @param array $arguments
* @return \OCP\Files\Storage
+ * @since 8.0.0
*/
public function getInstance(IMountPoint $mountPoint, $class, $arguments);
}
diff --git a/lib/public/files/storageinvalidexception.php b/lib/public/files/storageinvalidexception.php
index c6036a58046..11099c2fe03 100644
--- a/lib/public/files/storageinvalidexception.php
+++ b/lib/public/files/storageinvalidexception.php
@@ -31,6 +31,7 @@ namespace OCP\Files;
/**
* Storage has invalid configuration
+ * @since 7.0.0
*/
class StorageInvalidException extends \Exception {
}
diff --git a/lib/public/files/storagenotavailableexception.php b/lib/public/files/storagenotavailableexception.php
index 4b912caa5bd..842867ba567 100644
--- a/lib/public/files/storagenotavailableexception.php
+++ b/lib/public/files/storagenotavailableexception.php
@@ -31,6 +31,7 @@ namespace OCP\Files;
/**
* Storage is temporarily not available
+ * @since 6.0.0
*/
class StorageNotAvailableException extends \Exception {
}