@@ -35,144 +35,144 @@ |
||
35 | 35 | * @since 6.0.0 |
36 | 36 | */ |
37 | 37 | interface Folder extends Node { |
38 | - /** |
|
39 | - * Get the full path of an item in the folder within owncloud's filesystem |
|
40 | - * |
|
41 | - * @param string $path relative path of an item in the folder |
|
42 | - * @return string |
|
43 | - * @throws \OCP\Files\NotPermittedException |
|
44 | - * @since 6.0.0 |
|
45 | - */ |
|
46 | - public function getFullPath($path); |
|
47 | - |
|
48 | - /** |
|
49 | - * Get the path of an item in the folder relative to the folder |
|
50 | - * |
|
51 | - * @param string $path absolute path of an item in the folder |
|
52 | - * @throws \OCP\Files\NotFoundException |
|
53 | - * @return string |
|
54 | - * @since 6.0.0 |
|
55 | - */ |
|
56 | - public function getRelativePath($path); |
|
57 | - |
|
58 | - /** |
|
59 | - * check if a node is a (grand-)child of the folder |
|
60 | - * |
|
61 | - * @param \OCP\Files\Node $node |
|
62 | - * @return bool |
|
63 | - * @since 6.0.0 |
|
64 | - */ |
|
65 | - public function isSubNode($node); |
|
66 | - |
|
67 | - /** |
|
68 | - * get the content of this directory |
|
69 | - * |
|
70 | - * @throws \OCP\Files\NotFoundException |
|
71 | - * @return \OCP\Files\Node[] |
|
72 | - * @since 6.0.0 |
|
73 | - */ |
|
74 | - public function getDirectoryListing(); |
|
75 | - |
|
76 | - /** |
|
77 | - * Get the node at $path |
|
78 | - * |
|
79 | - * @param string $path relative path of the file or folder |
|
80 | - * @return \OCP\Files\Node |
|
81 | - * @throws \OCP\Files\NotFoundException |
|
82 | - * @since 6.0.0 |
|
83 | - */ |
|
84 | - public function get($path); |
|
85 | - |
|
86 | - /** |
|
87 | - * Check if a file or folder exists in the folder |
|
88 | - * |
|
89 | - * @param string $path relative path of the file or folder |
|
90 | - * @return bool |
|
91 | - * @since 6.0.0 |
|
92 | - */ |
|
93 | - public function nodeExists($path); |
|
94 | - |
|
95 | - /** |
|
96 | - * Create a new folder |
|
97 | - * |
|
98 | - * @param string $path relative path of the new folder |
|
99 | - * @return \OCP\Files\Folder |
|
100 | - * @throws \OCP\Files\NotPermittedException |
|
101 | - * @since 6.0.0 |
|
102 | - */ |
|
103 | - public function newFolder($path); |
|
104 | - |
|
105 | - /** |
|
106 | - * Create a new file |
|
107 | - * |
|
108 | - * @param string $path relative path of the new file |
|
109 | - * @return \OCP\Files\File |
|
110 | - * @throws \OCP\Files\NotPermittedException |
|
111 | - * @since 6.0.0 |
|
112 | - */ |
|
113 | - public function newFile($path); |
|
114 | - |
|
115 | - /** |
|
116 | - * search for files with the name matching $query |
|
117 | - * |
|
118 | - * @param string $query |
|
119 | - * @return \OCP\Files\Node[] |
|
120 | - * @since 6.0.0 |
|
121 | - */ |
|
122 | - public function search($query); |
|
123 | - |
|
124 | - /** |
|
125 | - * search for files by mimetype |
|
126 | - * $mimetype can either be a full mimetype (image/png) or a wildcard mimetype (image) |
|
127 | - * |
|
128 | - * @param string $mimetype |
|
129 | - * @return \OCP\Files\Node[] |
|
130 | - * @since 6.0.0 |
|
131 | - */ |
|
132 | - public function searchByMime($mimetype); |
|
133 | - |
|
134 | - /** |
|
135 | - * search for files by tag |
|
136 | - * |
|
137 | - * @param string|int $tag tag name or tag id |
|
138 | - * @param string $userId owner of the tags |
|
139 | - * @return \OCP\Files\Node[] |
|
140 | - * @since 8.0.0 |
|
141 | - */ |
|
142 | - public function searchByTag($tag, $userId); |
|
143 | - |
|
144 | - /** |
|
145 | - * get a file or folder inside the folder by it's internal id |
|
146 | - * |
|
147 | - * @param int $id |
|
148 | - * @return \OCP\Files\Node[] |
|
149 | - * @since 6.0.0 |
|
150 | - */ |
|
151 | - public function getById($id); |
|
152 | - |
|
153 | - /** |
|
154 | - * Get the amount of free space inside the folder |
|
155 | - * |
|
156 | - * @return int |
|
157 | - * @since 6.0.0 |
|
158 | - */ |
|
159 | - public function getFreeSpace(); |
|
160 | - |
|
161 | - /** |
|
162 | - * Check if new files or folders can be created within the folder |
|
163 | - * |
|
164 | - * @return bool |
|
165 | - * @since 6.0.0 |
|
166 | - */ |
|
167 | - public function isCreatable(); |
|
168 | - |
|
169 | - /** |
|
170 | - * Add a suffix to the name in case the file exists |
|
171 | - * |
|
172 | - * @param string $name |
|
173 | - * @return string |
|
174 | - * @throws NotPermittedException |
|
175 | - * @since 8.1.0 |
|
176 | - */ |
|
177 | - public function getNonExistingName($name); |
|
38 | + /** |
|
39 | + * Get the full path of an item in the folder within owncloud's filesystem |
|
40 | + * |
|
41 | + * @param string $path relative path of an item in the folder |
|
42 | + * @return string |
|
43 | + * @throws \OCP\Files\NotPermittedException |
|
44 | + * @since 6.0.0 |
|
45 | + */ |
|
46 | + public function getFullPath($path); |
|
47 | + |
|
48 | + /** |
|
49 | + * Get the path of an item in the folder relative to the folder |
|
50 | + * |
|
51 | + * @param string $path absolute path of an item in the folder |
|
52 | + * @throws \OCP\Files\NotFoundException |
|
53 | + * @return string |
|
54 | + * @since 6.0.0 |
|
55 | + */ |
|
56 | + public function getRelativePath($path); |
|
57 | + |
|
58 | + /** |
|
59 | + * check if a node is a (grand-)child of the folder |
|
60 | + * |
|
61 | + * @param \OCP\Files\Node $node |
|
62 | + * @return bool |
|
63 | + * @since 6.0.0 |
|
64 | + */ |
|
65 | + public function isSubNode($node); |
|
66 | + |
|
67 | + /** |
|
68 | + * get the content of this directory |
|
69 | + * |
|
70 | + * @throws \OCP\Files\NotFoundException |
|
71 | + * @return \OCP\Files\Node[] |
|
72 | + * @since 6.0.0 |
|
73 | + */ |
|
74 | + public function getDirectoryListing(); |
|
75 | + |
|
76 | + /** |
|
77 | + * Get the node at $path |
|
78 | + * |
|
79 | + * @param string $path relative path of the file or folder |
|
80 | + * @return \OCP\Files\Node |
|
81 | + * @throws \OCP\Files\NotFoundException |
|
82 | + * @since 6.0.0 |
|
83 | + */ |
|
84 | + public function get($path); |
|
85 | + |
|
86 | + /** |
|
87 | + * Check if a file or folder exists in the folder |
|
88 | + * |
|
89 | + * @param string $path relative path of the file or folder |
|
90 | + * @return bool |
|
91 | + * @since 6.0.0 |
|
92 | + */ |
|
93 | + public function nodeExists($path); |
|
94 | + |
|
95 | + /** |
|
96 | + * Create a new folder |
|
97 | + * |
|
98 | + * @param string $path relative path of the new folder |
|
99 | + * @return \OCP\Files\Folder |
|
100 | + * @throws \OCP\Files\NotPermittedException |
|
101 | + * @since 6.0.0 |
|
102 | + */ |
|
103 | + public function newFolder($path); |
|
104 | + |
|
105 | + /** |
|
106 | + * Create a new file |
|
107 | + * |
|
108 | + * @param string $path relative path of the new file |
|
109 | + * @return \OCP\Files\File |
|
110 | + * @throws \OCP\Files\NotPermittedException |
|
111 | + * @since 6.0.0 |
|
112 | + */ |
|
113 | + public function newFile($path); |
|
114 | + |
|
115 | + /** |
|
116 | + * search for files with the name matching $query |
|
117 | + * |
|
118 | + * @param string $query |
|
119 | + * @return \OCP\Files\Node[] |
|
120 | + * @since 6.0.0 |
|
121 | + */ |
|
122 | + public function search($query); |
|
123 | + |
|
124 | + /** |
|
125 | + * search for files by mimetype |
|
126 | + * $mimetype can either be a full mimetype (image/png) or a wildcard mimetype (image) |
|
127 | + * |
|
128 | + * @param string $mimetype |
|
129 | + * @return \OCP\Files\Node[] |
|
130 | + * @since 6.0.0 |
|
131 | + */ |
|
132 | + public function searchByMime($mimetype); |
|
133 | + |
|
134 | + /** |
|
135 | + * search for files by tag |
|
136 | + * |
|
137 | + * @param string|int $tag tag name or tag id |
|
138 | + * @param string $userId owner of the tags |
|
139 | + * @return \OCP\Files\Node[] |
|
140 | + * @since 8.0.0 |
|
141 | + */ |
|
142 | + public function searchByTag($tag, $userId); |
|
143 | + |
|
144 | + /** |
|
145 | + * get a file or folder inside the folder by it's internal id |
|
146 | + * |
|
147 | + * @param int $id |
|
148 | + * @return \OCP\Files\Node[] |
|
149 | + * @since 6.0.0 |
|
150 | + */ |
|
151 | + public function getById($id); |
|
152 | + |
|
153 | + /** |
|
154 | + * Get the amount of free space inside the folder |
|
155 | + * |
|
156 | + * @return int |
|
157 | + * @since 6.0.0 |
|
158 | + */ |
|
159 | + public function getFreeSpace(); |
|
160 | + |
|
161 | + /** |
|
162 | + * Check if new files or folders can be created within the folder |
|
163 | + * |
|
164 | + * @return bool |
|
165 | + * @since 6.0.0 |
|
166 | + */ |
|
167 | + public function isCreatable(); |
|
168 | + |
|
169 | + /** |
|
170 | + * Add a suffix to the name in case the file exists |
|
171 | + * |
|
172 | + * @param string $name |
|
173 | + * @return string |
|
174 | + * @throws NotPermittedException |
|
175 | + * @since 8.1.0 |
|
176 | + */ |
|
177 | + public function getNonExistingName($name); |
|
178 | 178 | } |
@@ -40,190 +40,190 @@ |
||
40 | 40 | * @since 6.0.0 - extends FileInfo was added in 8.0.0 |
41 | 41 | */ |
42 | 42 | interface Node extends FileInfo { |
43 | - /** |
|
44 | - * Move the file or folder to a new location |
|
45 | - * |
|
46 | - * @param string $targetPath the absolute target path |
|
47 | - * @throws \OCP\Files\NotPermittedException |
|
48 | - * @return \OCP\Files\Node |
|
49 | - * @since 6.0.0 |
|
50 | - */ |
|
51 | - public function move($targetPath); |
|
52 | - |
|
53 | - /** |
|
54 | - * Delete the file or folder |
|
55 | - * @return void |
|
56 | - * @since 6.0.0 |
|
57 | - */ |
|
58 | - public function delete(); |
|
59 | - |
|
60 | - /** |
|
61 | - * Cope the file or folder to a new location |
|
62 | - * |
|
63 | - * @param string $targetPath the absolute target path |
|
64 | - * @return \OCP\Files\Node |
|
65 | - * @since 6.0.0 |
|
66 | - */ |
|
67 | - public function copy($targetPath); |
|
68 | - |
|
69 | - /** |
|
70 | - * Change the modified date of the file or folder |
|
71 | - * If $mtime is omitted the current time will be used |
|
72 | - * |
|
73 | - * @param int $mtime (optional) modified date as unix timestamp |
|
74 | - * @throws \OCP\Files\NotPermittedException |
|
75 | - * @return void |
|
76 | - * @since 6.0.0 |
|
77 | - */ |
|
78 | - public function touch($mtime = null); |
|
79 | - |
|
80 | - /** |
|
81 | - * Get the storage backend the file or folder is stored on |
|
82 | - * |
|
83 | - * @return \OCP\Files\Storage |
|
84 | - * @throws \OCP\Files\NotFoundException |
|
85 | - * @since 6.0.0 |
|
86 | - */ |
|
87 | - public function getStorage(); |
|
88 | - |
|
89 | - /** |
|
90 | - * Get the full path of the file or folder |
|
91 | - * |
|
92 | - * @return string |
|
93 | - * @since 6.0.0 |
|
94 | - */ |
|
95 | - public function getPath(); |
|
96 | - |
|
97 | - /** |
|
98 | - * Get the path of the file or folder relative to the mountpoint of it's storage |
|
99 | - * |
|
100 | - * @return string |
|
101 | - * @since 6.0.0 |
|
102 | - */ |
|
103 | - public function getInternalPath(); |
|
104 | - |
|
105 | - /** |
|
106 | - * Get the internal file id for the file or folder |
|
107 | - * |
|
108 | - * @return int |
|
109 | - * @throws InvalidPathException |
|
110 | - * @throws NotFoundException |
|
111 | - * @since 6.0.0 |
|
112 | - */ |
|
113 | - public function getId(); |
|
114 | - |
|
115 | - /** |
|
116 | - * Get metadata of the file or folder |
|
117 | - * The returned array contains the following values: |
|
118 | - * - mtime |
|
119 | - * - size |
|
120 | - * |
|
121 | - * @return array |
|
122 | - * @since 6.0.0 |
|
123 | - */ |
|
124 | - public function stat(); |
|
125 | - |
|
126 | - /** |
|
127 | - * Get the modified date of the file or folder as unix timestamp |
|
128 | - * |
|
129 | - * @return int |
|
130 | - * @throws InvalidPathException |
|
131 | - * @throws NotFoundException |
|
132 | - * @since 6.0.0 |
|
133 | - */ |
|
134 | - public function getMTime(); |
|
135 | - |
|
136 | - /** |
|
137 | - * Get the size of the file or folder in bytes |
|
138 | - * |
|
139 | - * @return int |
|
140 | - * @throws InvalidPathException |
|
141 | - * @throws NotFoundException |
|
142 | - * @since 6.0.0 |
|
143 | - */ |
|
144 | - public function getSize(); |
|
145 | - |
|
146 | - /** |
|
147 | - * Get the Etag of the file or folder |
|
148 | - * The Etag is an string id used to detect changes to a file or folder, |
|
149 | - * every time the file or folder is changed the Etag will change to |
|
150 | - * |
|
151 | - * @return string |
|
152 | - * @throws InvalidPathException |
|
153 | - * @throws NotFoundException |
|
154 | - * @since 6.0.0 |
|
155 | - */ |
|
156 | - public function getEtag(); |
|
157 | - |
|
158 | - |
|
159 | - /** |
|
160 | - * Get the permissions of the file or folder as a combination of one or more of the following constants: |
|
161 | - * - \OCP\Constants::PERMISSION_READ |
|
162 | - * - \OCP\Constants::PERMISSION_UPDATE |
|
163 | - * - \OCP\Constants::PERMISSION_CREATE |
|
164 | - * - \OCP\Constants::PERMISSION_DELETE |
|
165 | - * - \OCP\Constants::PERMISSION_SHARE |
|
166 | - * |
|
167 | - * @return int |
|
168 | - * @throws InvalidPathException |
|
169 | - * @throws NotFoundException |
|
170 | - * @since 6.0.0 - namespace of constants has changed in 8.0.0 |
|
171 | - */ |
|
172 | - public function getPermissions(); |
|
173 | - |
|
174 | - /** |
|
175 | - * Check if the file or folder is readable |
|
176 | - * |
|
177 | - * @return bool |
|
178 | - * @throws InvalidPathException |
|
179 | - * @throws NotFoundException |
|
180 | - * @since 6.0.0 |
|
181 | - */ |
|
182 | - public function isReadable(); |
|
183 | - |
|
184 | - /** |
|
185 | - * Check if the file or folder is writable |
|
186 | - * |
|
187 | - * @return bool |
|
188 | - * @throws InvalidPathException |
|
189 | - * @throws NotFoundException |
|
190 | - * @since 6.0.0 |
|
191 | - */ |
|
192 | - public function isUpdateable(); |
|
193 | - |
|
194 | - /** |
|
195 | - * Check if the file or folder is deletable |
|
196 | - * |
|
197 | - * @return bool |
|
198 | - * @throws InvalidPathException |
|
199 | - * @throws NotFoundException |
|
200 | - * @since 6.0.0 |
|
201 | - */ |
|
202 | - public function isDeletable(); |
|
203 | - |
|
204 | - /** |
|
205 | - * Check if the file or folder is shareable |
|
206 | - * |
|
207 | - * @return bool |
|
208 | - * @throws InvalidPathException |
|
209 | - * @throws NotFoundException |
|
210 | - * @since 6.0.0 |
|
211 | - */ |
|
212 | - public function isShareable(); |
|
213 | - |
|
214 | - /** |
|
215 | - * Get the parent folder of the file or folder |
|
216 | - * |
|
217 | - * @return Folder |
|
218 | - * @since 6.0.0 |
|
219 | - */ |
|
220 | - public function getParent(); |
|
221 | - |
|
222 | - /** |
|
223 | - * Get the filename of the file or folder |
|
224 | - * |
|
225 | - * @return string |
|
226 | - * @since 6.0.0 |
|
227 | - */ |
|
228 | - public function getName(); |
|
43 | + /** |
|
44 | + * Move the file or folder to a new location |
|
45 | + * |
|
46 | + * @param string $targetPath the absolute target path |
|
47 | + * @throws \OCP\Files\NotPermittedException |
|
48 | + * @return \OCP\Files\Node |
|
49 | + * @since 6.0.0 |
|
50 | + */ |
|
51 | + public function move($targetPath); |
|
52 | + |
|
53 | + /** |
|
54 | + * Delete the file or folder |
|
55 | + * @return void |
|
56 | + * @since 6.0.0 |
|
57 | + */ |
|
58 | + public function delete(); |
|
59 | + |
|
60 | + /** |
|
61 | + * Cope the file or folder to a new location |
|
62 | + * |
|
63 | + * @param string $targetPath the absolute target path |
|
64 | + * @return \OCP\Files\Node |
|
65 | + * @since 6.0.0 |
|
66 | + */ |
|
67 | + public function copy($targetPath); |
|
68 | + |
|
69 | + /** |
|
70 | + * Change the modified date of the file or folder |
|
71 | + * If $mtime is omitted the current time will be used |
|
72 | + * |
|
73 | + * @param int $mtime (optional) modified date as unix timestamp |
|
74 | + * @throws \OCP\Files\NotPermittedException |
|
75 | + * @return void |
|
76 | + * @since 6.0.0 |
|
77 | + */ |
|
78 | + public function touch($mtime = null); |
|
79 | + |
|
80 | + /** |
|
81 | + * Get the storage backend the file or folder is stored on |
|
82 | + * |
|
83 | + * @return \OCP\Files\Storage |
|
84 | + * @throws \OCP\Files\NotFoundException |
|
85 | + * @since 6.0.0 |
|
86 | + */ |
|
87 | + public function getStorage(); |
|
88 | + |
|
89 | + /** |
|
90 | + * Get the full path of the file or folder |
|
91 | + * |
|
92 | + * @return string |
|
93 | + * @since 6.0.0 |
|
94 | + */ |
|
95 | + public function getPath(); |
|
96 | + |
|
97 | + /** |
|
98 | + * Get the path of the file or folder relative to the mountpoint of it's storage |
|
99 | + * |
|
100 | + * @return string |
|
101 | + * @since 6.0.0 |
|
102 | + */ |
|
103 | + public function getInternalPath(); |
|
104 | + |
|
105 | + /** |
|
106 | + * Get the internal file id for the file or folder |
|
107 | + * |
|
108 | + * @return int |
|
109 | + * @throws InvalidPathException |
|
110 | + * @throws NotFoundException |
|
111 | + * @since 6.0.0 |
|
112 | + */ |
|
113 | + public function getId(); |
|
114 | + |
|
115 | + /** |
|
116 | + * Get metadata of the file or folder |
|
117 | + * The returned array contains the following values: |
|
118 | + * - mtime |
|
119 | + * - size |
|
120 | + * |
|
121 | + * @return array |
|
122 | + * @since 6.0.0 |
|
123 | + */ |
|
124 | + public function stat(); |
|
125 | + |
|
126 | + /** |
|
127 | + * Get the modified date of the file or folder as unix timestamp |
|
128 | + * |
|
129 | + * @return int |
|
130 | + * @throws InvalidPathException |
|
131 | + * @throws NotFoundException |
|
132 | + * @since 6.0.0 |
|
133 | + */ |
|
134 | + public function getMTime(); |
|
135 | + |
|
136 | + /** |
|
137 | + * Get the size of the file or folder in bytes |
|
138 | + * |
|
139 | + * @return int |
|
140 | + * @throws InvalidPathException |
|
141 | + * @throws NotFoundException |
|
142 | + * @since 6.0.0 |
|
143 | + */ |
|
144 | + public function getSize(); |
|
145 | + |
|
146 | + /** |
|
147 | + * Get the Etag of the file or folder |
|
148 | + * The Etag is an string id used to detect changes to a file or folder, |
|
149 | + * every time the file or folder is changed the Etag will change to |
|
150 | + * |
|
151 | + * @return string |
|
152 | + * @throws InvalidPathException |
|
153 | + * @throws NotFoundException |
|
154 | + * @since 6.0.0 |
|
155 | + */ |
|
156 | + public function getEtag(); |
|
157 | + |
|
158 | + |
|
159 | + /** |
|
160 | + * Get the permissions of the file or folder as a combination of one or more of the following constants: |
|
161 | + * - \OCP\Constants::PERMISSION_READ |
|
162 | + * - \OCP\Constants::PERMISSION_UPDATE |
|
163 | + * - \OCP\Constants::PERMISSION_CREATE |
|
164 | + * - \OCP\Constants::PERMISSION_DELETE |
|
165 | + * - \OCP\Constants::PERMISSION_SHARE |
|
166 | + * |
|
167 | + * @return int |
|
168 | + * @throws InvalidPathException |
|
169 | + * @throws NotFoundException |
|
170 | + * @since 6.0.0 - namespace of constants has changed in 8.0.0 |
|
171 | + */ |
|
172 | + public function getPermissions(); |
|
173 | + |
|
174 | + /** |
|
175 | + * Check if the file or folder is readable |
|
176 | + * |
|
177 | + * @return bool |
|
178 | + * @throws InvalidPathException |
|
179 | + * @throws NotFoundException |
|
180 | + * @since 6.0.0 |
|
181 | + */ |
|
182 | + public function isReadable(); |
|
183 | + |
|
184 | + /** |
|
185 | + * Check if the file or folder is writable |
|
186 | + * |
|
187 | + * @return bool |
|
188 | + * @throws InvalidPathException |
|
189 | + * @throws NotFoundException |
|
190 | + * @since 6.0.0 |
|
191 | + */ |
|
192 | + public function isUpdateable(); |
|
193 | + |
|
194 | + /** |
|
195 | + * Check if the file or folder is deletable |
|
196 | + * |
|
197 | + * @return bool |
|
198 | + * @throws InvalidPathException |
|
199 | + * @throws NotFoundException |
|
200 | + * @since 6.0.0 |
|
201 | + */ |
|
202 | + public function isDeletable(); |
|
203 | + |
|
204 | + /** |
|
205 | + * Check if the file or folder is shareable |
|
206 | + * |
|
207 | + * @return bool |
|
208 | + * @throws InvalidPathException |
|
209 | + * @throws NotFoundException |
|
210 | + * @since 6.0.0 |
|
211 | + */ |
|
212 | + public function isShareable(); |
|
213 | + |
|
214 | + /** |
|
215 | + * Get the parent folder of the file or folder |
|
216 | + * |
|
217 | + * @return Folder |
|
218 | + * @since 6.0.0 |
|
219 | + */ |
|
220 | + public function getParent(); |
|
221 | + |
|
222 | + /** |
|
223 | + * Get the filename of the file or folder |
|
224 | + * |
|
225 | + * @return string |
|
226 | + * @since 6.0.0 |
|
227 | + */ |
|
228 | + public function getName(); |
|
229 | 229 | } |
@@ -31,28 +31,28 @@ |
||
31 | 31 | * @since 8.0.0 |
32 | 32 | */ |
33 | 33 | interface IMountProviderCollection { |
34 | - /** |
|
35 | - * Get all configured mount points for the user |
|
36 | - * |
|
37 | - * @param \OCP\IUser $user |
|
38 | - * @return \OCP\Files\Mount\IMountPoint[] |
|
39 | - * @since 8.0.0 |
|
40 | - */ |
|
41 | - public function getMountsForUser(IUser $user); |
|
34 | + /** |
|
35 | + * Get all configured mount points for the user |
|
36 | + * |
|
37 | + * @param \OCP\IUser $user |
|
38 | + * @return \OCP\Files\Mount\IMountPoint[] |
|
39 | + * @since 8.0.0 |
|
40 | + */ |
|
41 | + public function getMountsForUser(IUser $user); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Add a provider for mount points |
|
45 | - * |
|
46 | - * @param \OCP\Files\Config\IMountProvider $provider |
|
47 | - * @since 8.0.0 |
|
48 | - */ |
|
49 | - public function registerProvider(IMountProvider $provider); |
|
43 | + /** |
|
44 | + * Add a provider for mount points |
|
45 | + * |
|
46 | + * @param \OCP\Files\Config\IMountProvider $provider |
|
47 | + * @since 8.0.0 |
|
48 | + */ |
|
49 | + public function registerProvider(IMountProvider $provider); |
|
50 | 50 | |
51 | - /** |
|
52 | - * Get the mount cache which can be used to search for mounts without setting up the filesystem |
|
53 | - * |
|
54 | - * @return IUserMountCache |
|
55 | - * @since 9.0.0 |
|
56 | - */ |
|
57 | - public function getMountCache(); |
|
51 | + /** |
|
52 | + * Get the mount cache which can be used to search for mounts without setting up the filesystem |
|
53 | + * |
|
54 | + * @return IUserMountCache |
|
55 | + * @since 9.0.0 |
|
56 | + */ |
|
57 | + public function getMountCache(); |
|
58 | 58 | } |
@@ -31,33 +31,33 @@ |
||
31 | 31 | * @since 9.0.0 |
32 | 32 | */ |
33 | 33 | interface ICachedMountInfo { |
34 | - /** |
|
35 | - * @return IUser |
|
36 | - * @since 9.0.0 |
|
37 | - */ |
|
38 | - public function getUser(); |
|
34 | + /** |
|
35 | + * @return IUser |
|
36 | + * @since 9.0.0 |
|
37 | + */ |
|
38 | + public function getUser(); |
|
39 | 39 | |
40 | - /** |
|
41 | - * @return int the numeric storage id of the mount |
|
42 | - * @since 9.0.0 |
|
43 | - */ |
|
44 | - public function getStorageId(); |
|
40 | + /** |
|
41 | + * @return int the numeric storage id of the mount |
|
42 | + * @since 9.0.0 |
|
43 | + */ |
|
44 | + public function getStorageId(); |
|
45 | 45 | |
46 | - /** |
|
47 | - * @return int the fileid of the root of the mount |
|
48 | - * @since 9.0.0 |
|
49 | - */ |
|
50 | - public function getRootId(); |
|
46 | + /** |
|
47 | + * @return int the fileid of the root of the mount |
|
48 | + * @since 9.0.0 |
|
49 | + */ |
|
50 | + public function getRootId(); |
|
51 | 51 | |
52 | - /** |
|
53 | - * @return Node the root node of the mount |
|
54 | - * @since 9.0.0 |
|
55 | - */ |
|
56 | - public function getMountPointNode(); |
|
52 | + /** |
|
53 | + * @return Node the root node of the mount |
|
54 | + * @since 9.0.0 |
|
55 | + */ |
|
56 | + public function getMountPointNode(); |
|
57 | 57 | |
58 | - /** |
|
59 | - * @return string the mount point of the mount for the user |
|
60 | - * @since 9.0.0 |
|
61 | - */ |
|
62 | - public function getMountPoint(); |
|
58 | + /** |
|
59 | + * @return string the mount point of the mount for the user |
|
60 | + * @since 9.0.0 |
|
61 | + */ |
|
62 | + public function getMountPoint(); |
|
63 | 63 | } |
@@ -31,75 +31,75 @@ |
||
31 | 31 | * @since 9.0.0 |
32 | 32 | */ |
33 | 33 | interface IUserMountCache { |
34 | - /** |
|
35 | - * Register mounts for a user to the cache |
|
36 | - * |
|
37 | - * @param IUser $user |
|
38 | - * @param IMountPoint[] $mounts |
|
39 | - * @since 9.0.0 |
|
40 | - */ |
|
41 | - public function registerMounts(IUser $user, array $mounts); |
|
34 | + /** |
|
35 | + * Register mounts for a user to the cache |
|
36 | + * |
|
37 | + * @param IUser $user |
|
38 | + * @param IMountPoint[] $mounts |
|
39 | + * @since 9.0.0 |
|
40 | + */ |
|
41 | + public function registerMounts(IUser $user, array $mounts); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Get all cached mounts for a user |
|
45 | - * |
|
46 | - * @param IUser $user |
|
47 | - * @return ICachedMountInfo[] |
|
48 | - * @since 9.0.0 |
|
49 | - */ |
|
50 | - public function getMountsForUser(IUser $user); |
|
43 | + /** |
|
44 | + * Get all cached mounts for a user |
|
45 | + * |
|
46 | + * @param IUser $user |
|
47 | + * @return ICachedMountInfo[] |
|
48 | + * @since 9.0.0 |
|
49 | + */ |
|
50 | + public function getMountsForUser(IUser $user); |
|
51 | 51 | |
52 | - /** |
|
53 | - * Get all cached mounts by storage |
|
54 | - * |
|
55 | - * @param int $numericStorageId |
|
56 | - * @return ICachedMountInfo[] |
|
57 | - * @since 9.0.0 |
|
58 | - */ |
|
59 | - public function getMountsForStorageId($numericStorageId); |
|
52 | + /** |
|
53 | + * Get all cached mounts by storage |
|
54 | + * |
|
55 | + * @param int $numericStorageId |
|
56 | + * @return ICachedMountInfo[] |
|
57 | + * @since 9.0.0 |
|
58 | + */ |
|
59 | + public function getMountsForStorageId($numericStorageId); |
|
60 | 60 | |
61 | - /** |
|
62 | - * Get all cached mounts by root |
|
63 | - * |
|
64 | - * @param int $rootFileId |
|
65 | - * @return ICachedMountInfo[] |
|
66 | - * @since 9.0.0 |
|
67 | - */ |
|
68 | - public function getMountsForRootId($rootFileId); |
|
61 | + /** |
|
62 | + * Get all cached mounts by root |
|
63 | + * |
|
64 | + * @param int $rootFileId |
|
65 | + * @return ICachedMountInfo[] |
|
66 | + * @since 9.0.0 |
|
67 | + */ |
|
68 | + public function getMountsForRootId($rootFileId); |
|
69 | 69 | |
70 | - /** |
|
71 | - * Get all cached mounts that contain a file |
|
72 | - * |
|
73 | - * @param int $fileId |
|
74 | - * @return ICachedMountInfo[] |
|
75 | - * @since 9.0.0 |
|
76 | - */ |
|
77 | - public function getMountsForFileId($fileId); |
|
70 | + /** |
|
71 | + * Get all cached mounts that contain a file |
|
72 | + * |
|
73 | + * @param int $fileId |
|
74 | + * @return ICachedMountInfo[] |
|
75 | + * @since 9.0.0 |
|
76 | + */ |
|
77 | + public function getMountsForFileId($fileId); |
|
78 | 78 | |
79 | - /** |
|
80 | - * Remove all cached mounts for a user |
|
81 | - * |
|
82 | - * @param IUser $user |
|
83 | - * @since 9.0.0 |
|
84 | - */ |
|
85 | - public function removeUserMounts(IUser $user); |
|
79 | + /** |
|
80 | + * Remove all cached mounts for a user |
|
81 | + * |
|
82 | + * @param IUser $user |
|
83 | + * @since 9.0.0 |
|
84 | + */ |
|
85 | + public function removeUserMounts(IUser $user); |
|
86 | 86 | |
87 | - /** |
|
88 | - * Remove all mounts for a user and storage |
|
89 | - * |
|
90 | - * @param $storageId |
|
91 | - * @param string $userId |
|
92 | - * @return mixed |
|
93 | - * @since 9.0.0 |
|
94 | - */ |
|
95 | - public function removeUserStorageMount($storageId, $userId); |
|
87 | + /** |
|
88 | + * Remove all mounts for a user and storage |
|
89 | + * |
|
90 | + * @param $storageId |
|
91 | + * @param string $userId |
|
92 | + * @return mixed |
|
93 | + * @since 9.0.0 |
|
94 | + */ |
|
95 | + public function removeUserStorageMount($storageId, $userId); |
|
96 | 96 | |
97 | - /** |
|
98 | - * Remove all cached mounts for a storage |
|
99 | - * |
|
100 | - * @param $storageId |
|
101 | - * @return mixed |
|
102 | - * @since 9.0.0 |
|
103 | - */ |
|
104 | - public function remoteStorageMounts($storageId); |
|
97 | + /** |
|
98 | + * Remove all cached mounts for a storage |
|
99 | + * |
|
100 | + * @param $storageId |
|
101 | + * @return mixed |
|
102 | + * @since 9.0.0 |
|
103 | + */ |
|
104 | + public function remoteStorageMounts($storageId); |
|
105 | 105 | } |
@@ -31,13 +31,13 @@ |
||
31 | 31 | * @since 8.0.0 |
32 | 32 | */ |
33 | 33 | interface IMountProvider { |
34 | - /** |
|
35 | - * Get all mountpoints applicable for the user |
|
36 | - * |
|
37 | - * @param \OCP\IUser $user |
|
38 | - * @param \OCP\Files\Storage\IStorageFactory $loader |
|
39 | - * @return \OCP\Files\Mount\IMountPoint[] |
|
40 | - * @since 8.0.0 |
|
41 | - */ |
|
42 | - public function getMountsForUser(IUser $user, IStorageFactory $loader); |
|
34 | + /** |
|
35 | + * Get all mountpoints applicable for the user |
|
36 | + * |
|
37 | + * @param \OCP\IUser $user |
|
38 | + * @param \OCP\Files\Storage\IStorageFactory $loader |
|
39 | + * @return \OCP\Files\Mount\IMountPoint[] |
|
40 | + * @since 8.0.0 |
|
41 | + */ |
|
42 | + public function getMountsForUser(IUser $user, IStorageFactory $loader); |
|
43 | 43 | } |
@@ -30,34 +30,34 @@ |
||
30 | 30 | */ |
31 | 31 | interface IObjectStore { |
32 | 32 | |
33 | - /** |
|
34 | - * @return string the container or bucket name where objects are stored |
|
35 | - * @since 7.0.0 |
|
36 | - */ |
|
37 | - function getStorageId(); |
|
33 | + /** |
|
34 | + * @return string the container or bucket name where objects are stored |
|
35 | + * @since 7.0.0 |
|
36 | + */ |
|
37 | + function getStorageId(); |
|
38 | 38 | |
39 | - /** |
|
40 | - * @param string $urn the unified resource name used to identify the object |
|
41 | - * @return resource stream with the read data |
|
42 | - * @throws \Exception when something goes wrong, message will be logged |
|
43 | - * @since 7.0.0 |
|
44 | - */ |
|
45 | - function readObject($urn); |
|
39 | + /** |
|
40 | + * @param string $urn the unified resource name used to identify the object |
|
41 | + * @return resource stream with the read data |
|
42 | + * @throws \Exception when something goes wrong, message will be logged |
|
43 | + * @since 7.0.0 |
|
44 | + */ |
|
45 | + function readObject($urn); |
|
46 | 46 | |
47 | - /** |
|
48 | - * @param string $urn the unified resource name used to identify the object |
|
49 | - * @param resource $stream stream with the data to write |
|
50 | - * @throws \Exception when something goes wrong, message will be logged |
|
51 | - * @since 7.0.0 |
|
52 | - */ |
|
53 | - function writeObject($urn, $stream); |
|
47 | + /** |
|
48 | + * @param string $urn the unified resource name used to identify the object |
|
49 | + * @param resource $stream stream with the data to write |
|
50 | + * @throws \Exception when something goes wrong, message will be logged |
|
51 | + * @since 7.0.0 |
|
52 | + */ |
|
53 | + function writeObject($urn, $stream); |
|
54 | 54 | |
55 | - /** |
|
56 | - * @param string $urn the unified resource name used to identify the object |
|
57 | - * @return void |
|
58 | - * @throws \Exception when something goes wrong, message will be logged |
|
59 | - * @since 7.0.0 |
|
60 | - */ |
|
61 | - function deleteObject($urn); |
|
55 | + /** |
|
56 | + * @param string $urn the unified resource name used to identify the object |
|
57 | + * @return void |
|
58 | + * @throws \Exception when something goes wrong, message will be logged |
|
59 | + * @since 7.0.0 |
|
60 | + */ |
|
61 | + function deleteObject($urn); |
|
62 | 62 | |
63 | 63 | } |
@@ -31,77 +31,77 @@ |
||
31 | 31 | */ |
32 | 32 | interface IMountManager { |
33 | 33 | |
34 | - /** |
|
35 | - * Add a new mount |
|
36 | - * |
|
37 | - * @param \OCP\Files\Mount\IMountPoint $mount |
|
38 | - * @since 8.2.0 |
|
39 | - */ |
|
40 | - public function addMount(IMountPoint $mount); |
|
34 | + /** |
|
35 | + * Add a new mount |
|
36 | + * |
|
37 | + * @param \OCP\Files\Mount\IMountPoint $mount |
|
38 | + * @since 8.2.0 |
|
39 | + */ |
|
40 | + public function addMount(IMountPoint $mount); |
|
41 | 41 | |
42 | - /** |
|
43 | - * Remove a mount |
|
44 | - * |
|
45 | - * @param string $mountPoint |
|
46 | - * @since 8.2.0 |
|
47 | - */ |
|
48 | - public function removeMount($mountPoint); |
|
42 | + /** |
|
43 | + * Remove a mount |
|
44 | + * |
|
45 | + * @param string $mountPoint |
|
46 | + * @since 8.2.0 |
|
47 | + */ |
|
48 | + public function removeMount($mountPoint); |
|
49 | 49 | |
50 | - /** |
|
51 | - * Change the location of a mount |
|
52 | - * |
|
53 | - * @param string $mountPoint |
|
54 | - * @param string $target |
|
55 | - * @since 8.2.0 |
|
56 | - */ |
|
57 | - public function moveMount($mountPoint, $target); |
|
50 | + /** |
|
51 | + * Change the location of a mount |
|
52 | + * |
|
53 | + * @param string $mountPoint |
|
54 | + * @param string $target |
|
55 | + * @since 8.2.0 |
|
56 | + */ |
|
57 | + public function moveMount($mountPoint, $target); |
|
58 | 58 | |
59 | - /** |
|
60 | - * Find the mount for $path |
|
61 | - * |
|
62 | - * @param string $path |
|
63 | - * @return \OCP\Files\Mount\IMountPoint |
|
64 | - * @since 8.2.0 |
|
65 | - */ |
|
66 | - public function find($path); |
|
59 | + /** |
|
60 | + * Find the mount for $path |
|
61 | + * |
|
62 | + * @param string $path |
|
63 | + * @return \OCP\Files\Mount\IMountPoint |
|
64 | + * @since 8.2.0 |
|
65 | + */ |
|
66 | + public function find($path); |
|
67 | 67 | |
68 | - /** |
|
69 | - * Find all mounts in $path |
|
70 | - * |
|
71 | - * @param string $path |
|
72 | - * @return \OCP\Files\Mount\IMountPoint[] |
|
73 | - * @since 8.2.0 |
|
74 | - */ |
|
75 | - public function findIn($path); |
|
68 | + /** |
|
69 | + * Find all mounts in $path |
|
70 | + * |
|
71 | + * @param string $path |
|
72 | + * @return \OCP\Files\Mount\IMountPoint[] |
|
73 | + * @since 8.2.0 |
|
74 | + */ |
|
75 | + public function findIn($path); |
|
76 | 76 | |
77 | - /** |
|
78 | - * Remove all registered mounts |
|
79 | - * |
|
80 | - * @since 8.2.0 |
|
81 | - */ |
|
82 | - public function clear(); |
|
77 | + /** |
|
78 | + * Remove all registered mounts |
|
79 | + * |
|
80 | + * @since 8.2.0 |
|
81 | + */ |
|
82 | + public function clear(); |
|
83 | 83 | |
84 | - /** |
|
85 | - * Find mounts by storage id |
|
86 | - * |
|
87 | - * @param string $id |
|
88 | - * @return \OCP\Files\Mount\IMountPoint[] |
|
89 | - * @since 8.2.0 |
|
90 | - */ |
|
91 | - public function findByStorageId($id); |
|
84 | + /** |
|
85 | + * Find mounts by storage id |
|
86 | + * |
|
87 | + * @param string $id |
|
88 | + * @return \OCP\Files\Mount\IMountPoint[] |
|
89 | + * @since 8.2.0 |
|
90 | + */ |
|
91 | + public function findByStorageId($id); |
|
92 | 92 | |
93 | - /** |
|
94 | - * @return \OCP\Files\Mount\IMountPoint[] |
|
95 | - * @since 8.2.0 |
|
96 | - */ |
|
97 | - public function getAll(); |
|
93 | + /** |
|
94 | + * @return \OCP\Files\Mount\IMountPoint[] |
|
95 | + * @since 8.2.0 |
|
96 | + */ |
|
97 | + public function getAll(); |
|
98 | 98 | |
99 | - /** |
|
100 | - * Find mounts by numeric storage id |
|
101 | - * |
|
102 | - * @param int $id |
|
103 | - * @return \OCP\Files\Mount\IMountPoint[] |
|
104 | - * @since 8.2.0 |
|
105 | - */ |
|
106 | - public function findByNumericId($id); |
|
99 | + /** |
|
100 | + * Find mounts by numeric storage id |
|
101 | + * |
|
102 | + * @param int $id |
|
103 | + * @return \OCP\Files\Mount\IMountPoint[] |
|
104 | + * @since 8.2.0 |
|
105 | + */ |
|
106 | + public function findByNumericId($id); |
|
107 | 107 | } |
@@ -29,70 +29,70 @@ |
||
29 | 29 | */ |
30 | 30 | interface IMountPoint { |
31 | 31 | |
32 | - /** |
|
33 | - * get complete path to the mount point |
|
34 | - * |
|
35 | - * @return string |
|
36 | - * @since 8.0.0 |
|
37 | - */ |
|
38 | - public function getMountPoint(); |
|
32 | + /** |
|
33 | + * get complete path to the mount point |
|
34 | + * |
|
35 | + * @return string |
|
36 | + * @since 8.0.0 |
|
37 | + */ |
|
38 | + public function getMountPoint(); |
|
39 | 39 | |
40 | - /** |
|
41 | - * Set the mountpoint |
|
42 | - * |
|
43 | - * @param string $mountPoint new mount point |
|
44 | - * @since 8.0.0 |
|
45 | - */ |
|
46 | - public function setMountPoint($mountPoint); |
|
40 | + /** |
|
41 | + * Set the mountpoint |
|
42 | + * |
|
43 | + * @param string $mountPoint new mount point |
|
44 | + * @since 8.0.0 |
|
45 | + */ |
|
46 | + public function setMountPoint($mountPoint); |
|
47 | 47 | |
48 | - /** |
|
49 | - * Get the storage that is mounted |
|
50 | - * |
|
51 | - * @return \OC\Files\Storage\Storage |
|
52 | - * @since 8.0.0 |
|
53 | - */ |
|
54 | - public function getStorage(); |
|
48 | + /** |
|
49 | + * Get the storage that is mounted |
|
50 | + * |
|
51 | + * @return \OC\Files\Storage\Storage |
|
52 | + * @since 8.0.0 |
|
53 | + */ |
|
54 | + public function getStorage(); |
|
55 | 55 | |
56 | - /** |
|
57 | - * Get the id of the storages |
|
58 | - * |
|
59 | - * @return string |
|
60 | - * @since 8.0.0 |
|
61 | - */ |
|
62 | - public function getStorageId(); |
|
56 | + /** |
|
57 | + * Get the id of the storages |
|
58 | + * |
|
59 | + * @return string |
|
60 | + * @since 8.0.0 |
|
61 | + */ |
|
62 | + public function getStorageId(); |
|
63 | 63 | |
64 | - /** |
|
65 | - * Get the path relative to the mountpoint |
|
66 | - * |
|
67 | - * @param string $path absolute path to a file or folder |
|
68 | - * @return string |
|
69 | - * @since 8.0.0 |
|
70 | - */ |
|
71 | - public function getInternalPath($path); |
|
64 | + /** |
|
65 | + * Get the path relative to the mountpoint |
|
66 | + * |
|
67 | + * @param string $path absolute path to a file or folder |
|
68 | + * @return string |
|
69 | + * @since 8.0.0 |
|
70 | + */ |
|
71 | + public function getInternalPath($path); |
|
72 | 72 | |
73 | - /** |
|
74 | - * Apply a storage wrapper to the mounted storage |
|
75 | - * |
|
76 | - * @param callable $wrapper |
|
77 | - * @since 8.0.0 |
|
78 | - */ |
|
79 | - public function wrapStorage($wrapper); |
|
73 | + /** |
|
74 | + * Apply a storage wrapper to the mounted storage |
|
75 | + * |
|
76 | + * @param callable $wrapper |
|
77 | + * @since 8.0.0 |
|
78 | + */ |
|
79 | + public function wrapStorage($wrapper); |
|
80 | 80 | |
81 | - /** |
|
82 | - * Get a mount option |
|
83 | - * |
|
84 | - * @param string $name Name of the mount option to get |
|
85 | - * @param mixed $default Default value for the mount option |
|
86 | - * @return mixed |
|
87 | - * @since 8.0.0 |
|
88 | - */ |
|
89 | - public function getOption($name, $default); |
|
81 | + /** |
|
82 | + * Get a mount option |
|
83 | + * |
|
84 | + * @param string $name Name of the mount option to get |
|
85 | + * @param mixed $default Default value for the mount option |
|
86 | + * @return mixed |
|
87 | + * @since 8.0.0 |
|
88 | + */ |
|
89 | + public function getOption($name, $default); |
|
90 | 90 | |
91 | - /** |
|
92 | - * Get all options for the mount |
|
93 | - * |
|
94 | - * @return array |
|
95 | - * @since 8.1.0 |
|
96 | - */ |
|
97 | - public function getOptions(); |
|
91 | + /** |
|
92 | + * Get all options for the mount |
|
93 | + * |
|
94 | + * @return array |
|
95 | + * @since 8.1.0 |
|
96 | + */ |
|
97 | + public function getOptions(); |
|
98 | 98 | } |