summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
Commit message (Collapse)AuthorAgeFilesLines
* set mountid for personal external storage mountsRobin Appelman2020-12-022-3/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Check if array elements exist before using themRoeland Jago Douma2020-10-271-1/+7
| | | | | | | | It seems that in some recent upgrade here. Not always the entries we expect are returned. So we should first check if they exist. As to not spam the log. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* add option to disable notify self checkRobin Appelman2020-10-141-1/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #23233 from nextcloud/notify-saved-login-auth-19blizzz2020-10-131-14/+56
|\ | | | | [19] allow using saved login credentials for notify
| * also give storage backend it's change to manipulate the configRobin Appelman2020-10-071-0/+9
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * allow using saved login credentials for notifyRobin Appelman2020-10-061-14/+47
| | | | | | | | | | | | when only the user is provided, we use to provided user to try and get saved login credentials Signed-off-by: Robin Appelman <robin@icewind.nl>
* | improve handling of out of space errors for smbRobin Appelman2020-09-171-0/+6
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Set delimiter so that the CommonPrefixes response can properly be determinedJulius Härtl2020-09-101-1/+2
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | fix s3 doesDirectoryExist check for empty directoriesRobin Appelman2020-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | if a directory is empty, only the 'marker' object `/` exists. since not all s3 implementations return just the prefix when listing objects by prefix, when listing objects by the folder prefix, nothing will be returned if the directory is empty. by not including the trailing slash in the prefix, the folder marked will always be returned if it exists Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Fix reading empty files from objectstorageRoeland Jago Douma2020-09-091-2/+8
| | | | | | | | | | | | | | | | Since we try to do range requests this will fail hard. However since empty files are not that interesting to read anyways we just read from an emptry memory stream. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Reuse cache for directory mtime/size if filesystem changes can be ignoredJulius Härtl2020-08-101-0/+6
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Remove rescanDelay from directory mtimeJulius Härtl2020-06-251-6/+1
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* normalize sftp path in read and write streamRobin Appelman2020-06-032-0/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headers for 19Christoph Wurst2020-04-2934-1/+34
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add tooltip to optionRobin Appelman2020-04-221-1/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add option to check share ACL's when listing directoriesRobin Appelman2020-04-212-0/+37
| | | | | | | | | | | | | | If a file or folder in a directory doesn't have read permissions they will not be shown Note that enabling this option incurs a performance penalty additional requests need to be made to get all the acl. Additionally the acl resolving logic is fairly primitive at the moment and might not work correctly in all setups (it should error to showing the entry) Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add method to storage backends to get directory content with metadataRobin Appelman2020-04-201-8/+57
| | | | | | | | | | | | | | | | | Currently you need to use `opendir` and then call `getMetadata` for every file, which adds overhead because most storage backends already get the metadata when doing the `opendir`. While storagebackends can (and do) use caching to relief this problem, this adds cache invalidation dificulties and only a limited number of items are generally cached (to prevent memory usage exploding when scanning large storages) With this new methods storage backends can use the child metadata they got from listing the folder to return metadata without having to keep seperate caches. Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix issues with Keystone auth v3 in files_external appJulien Lutran2020-04-152-2/+2
| | | | Signed-off-by: Julien Lutran <julien.lutran@corp.ovh.com>
* Add visibility to all constantsChristoph Wurst2020-04-1013-39/+39
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-1012-12/+12
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-1065-128/+36
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-1010-19/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20391 from nextcloud/refactor/spaces-cleanupChristoph Wurst2020-04-093-3/+2
|\ | | | | Remove all extra whitespace PSR2 does not like
| * Make sure every file ends with an empty newlineChristoph Wurst2020-04-091-1/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
| * Remove trailing and in between spacesChristoph Wurst2020-04-092-2/+2
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #20384 from nextcloud/techdebt/lowercase-keywordsChristoph Wurst2020-04-091-2/+2
|\ \ | |/ |/| Use php keywords in lowercase
| * Use php keywords in lowercaseChristoph Wurst2020-04-091-2/+2
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-097-10/+10
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-099-7/+2
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-092-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiline commentsChristoph Wurst2020-04-082-6/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* allow setting tooltips for external storage config optionsRobin Appelman2020-04-031-1/+21
| | | | | | allows explaining non-obvious config options a bit more Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-3114-5/+26
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20208 from nextcloud/smb-folder-contents-normalize-pathJohn Molakvoæ2020-03-301-1/+1
|\ | | | | normalize smb path while listing folder contents
| * normalize smb path while listing folder contentsRobin Appelman2020-03-271-1/+1
| | | | | | | | | | | | | | currently when listing `'/'`, it will include a double slash in the paths used for the listing logic this causes unneeeded cache misses in the statCache Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-274-5/+0
|\ \ | | | | | | Remove unused imports
| * | Remove unused importsChristoph Wurst2020-03-254-5/+0
| |/ | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* / Use the short array syntax, everywhereChristoph Wurst2020-03-2611-39/+39
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Do not use the deprecated service nameChristoph Wurst2020-03-191-4/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* remove the requirement that everything that looks like a placeholder is ↵Robin Appelman2020-03-131-28/+0
| | | | | | | | substituted While maybe not common, `$` is a valid option in config fields Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #19915 from nextcloud/external-storage-password-placeholdersJoas Schilling2020-03-138-37/+65
|\ | | | | Use placeholder values for password fields in external storage webui
| * Use placeholder values for password fields in external storage webuiRobin Appelman2020-03-128-37/+65
| | | | | | | | | | | | | | | | | | | | This prevents the password from being sent to the webui. While an admin will always be able to retrieve the passwords (as they can do arbitrairy code execution by design) this prevents casual password snooping Signed-off-by: Robin Appelman <robin@icewind.nl>
* | faster implementation of SFTP write streamRobin Appelman2020-03-103-0/+184
| | | | | | | | | | | | using mostly the same techniques as the read stream Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Faster implementation of sftp read streamRobin Appelman2020-03-062-0/+200
|/ | | | | | | | | | - Keeps a single file handle open instead of creating a new one for every stream_read - Read from sftp in large chunks instead of the 8k internal php size - Request a read for the next chunk while we're still processing the current one Signed-off-by: Robin Appelman <robin@icewind.nl>
* do not overwrite global user auth credentials with empty valuesArthur Schiwon2020-02-061-0/+5
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update license headers for 18Christoph Wurst2019-12-201-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #18256 from nextcloud/files-aditional-scripts-new-eventsRoeland Jago Douma2019-12-091-1/+3
|\ | | | | Use non-depricated events for loading additional scripts in files app
| * use OCP\EventDispatcher\GenericEvent in more placesRobin Appelman2019-12-091-1/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | rejig right to left join for sqlite's satisfactionArthur Schiwon2019-12-061-3/+3
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Update license headersChristoph Wurst2019-12-0598-109/+211
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>