aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib/Storage
Commit message (Collapse)AuthorAgeFilesLines
...
* Delete object to cleanup leftover of paths when removing directoriesJulius Härtl2021-08-131-0/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Gracefully handle smb acls for users without a domainRichard Steinmetz2021-08-131-1/+1
| | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-049-12/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* set mimetype for objects uploaded to object storagesRobin Appelman2021-04-212-4/+14
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Continue iterating over diretory contents and just hide file if denied by aclJulius Härtl2021-04-201-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* ignore readonly flag for directoriesRobin Appelman2021-03-251-8/+2
| | | | | | see http://support.microsoft.com/kb/326549 Signed-off-by: Robin Appelman <robin@icewind.nl>
* add (hidden) option to always show smb root as writableRobin Appelman2021-03-161-1/+9
| | | | | | | | | | | | | | | | | | | | some smb servers are very insistent in reporting that the root of the share is readonly, even if it isn't. This works around the problem by adding a hidden option to overwrite the permissions of the root of the share. This can be enabled using ```bash occ files_external:config <mount id> root_force_writable true ``` where you can find your mount id using ```bash occ files_external:list ``` Signed-off-by: Robin Appelman <robin@icewind.nl>
* catch notfound and forbidden exception in smb::getmetadataRobin Appelman2021-03-041-1/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Properly handle SMB ACL blocking scanning a directoryJulius Härtl2021-01-291-2/+7
| | | | | | | | This makes sure that a possible ForbiddenException is properly passed through the storage as a ForbiddenException and can be catched when trying to fetch the quota info of a parent folder Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Bump phpseclib/phpseclib from 2.0.25 to 2.0.30Christoph Wurst2021-01-191-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Bump icewind/streams from 0.7.1 to 0.7.2Christoph Wurst2020-12-291-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-167-8/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove the deprecated update.phpChristoph Wurst2020-11-271-1/+1
| | | | | | | | * It was documented as deprecated. * The app code checker warned about it * It's been three years Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Check if array elements exist before using themRoeland Jago Douma2020-10-251-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>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-052-14/+14
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #21734 from nextcloud/external-s3-no-touchMorris Jobke2020-08-201-17/+1
|\ | | | | disable touch to update mtime for external s3 storage
| * disable touch to update mtime for external s3 storageRobin Appelman2020-07-071-17/+1
| | | | | | | | | | | | since updating the mtime requires doing a copy this can have a significant overhead and it messes with versioning Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Use matching parameter names form interfaces and implementationsMorris Jobke2020-08-191-1/+1
| | | | | | | | | | | | Found by Psalm 3.14.1 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Remove unused method uploadFileDaniel Kesselberg2020-08-131-9/+0
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Merge pull request #21728 from nextcloud/bugfix/noid/s3-external-mtime-cacheMorris Jobke2020-07-151-0/+6
|\ \ | | | | | | Reuse cache for directory mtime/size if filesystem changes can be ignored
| * | Reuse cache for directory mtime/size if filesystem changes can be ignoredJulius Härtl2020-07-071-0/+6
| |/ | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* / filter files containing a hash in the path for ftp storagesRobin Appelman2020-07-101-0/+17
|/ | | | | | | | the php ftp streamwrapper doesn't handle hashes correctly and will break when it tries to enter a path containing a hash. By filtering out paths containing a hash we can at least stop the external storage from breaking completely Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove rescanDelay from directory mtimeJulius Härtl2020-06-221-6/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* normalize sftp path in read and write streamRobin Appelman2020-05-252-0/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headers for 19Christoph Wurst2020-04-294-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add option to check share ACL's when listing directoriesRobin Appelman2020-04-211-0/+34
| | | | | | | | | | | | | | 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>
* Add visibility to all constantsChristoph Wurst2020-04-102-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-102-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-109-27/+12
| | | | | | | | | | | | | | | 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-105-8/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-092-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-092-0/+2
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiline commentsChristoph Wurst2020-04-081-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-317-4/+19
| | | | 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>
* | Use the short array syntax, everywhereChristoph Wurst2020-03-265-25/+25
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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>
* Update license headersChristoph Wurst2019-12-057-12/+21
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-222-1/+2
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove superfluous fcloseDaniel Kesselberg2019-10-211-1/+0
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>