summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Common.php
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "[stable26] handle not being able to write file for notify ↵John Molakvoæ2023-04-141-0/+3
| | | | self-test""
* Revert "[stable26] handle not being able to write file for notify self-test"John Molakvoæ2023-04-131-3/+0
|
* handle not being able to write file for notify self-testRobin Appelman2023-04-131-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Adapt types of subclassesCôme Chilliet2023-04-011-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Respect OCP interface in private classesCôme Chilliet2023-02-071-1/+1
| | | | | | | Because the parameter type was moved to phpdoc it needs to be removed from implementations Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm errors related to filesizesCôme Chilliet2023-02-071-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Strong type filesize related methods to ease 32bits problem findingsCôme Chilliet2023-02-071-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Rename file1 and file2 to source and target in Storage abstractionCarl Schwan2022-10-181-15/+15
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #31475 from nextcloud/kofemann-patch-1blizzz2022-06-211-0/+1
|\ | | | | files: close open directory file descriptor on error path
| * files: close open directory file descriptor on error pathTiramisu Mokka2022-03-071-0/+1
| |
* | Remove ILogger usages in lib/private/Files/StorageCôme Chilliet2022-04-261-11/+17
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | some file scanner performance improvementsRobin Appelman2022-03-171-1/+6
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Check for invalid characters before trimmingJoas Schilling2021-11-251-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make sure that a empty directory can still be deleted when copied from ↵Julius Härtl2021-08-131-0/+1
| | | | | | another storage Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Remove some mentions of ownCloud from our api documentationCarl Schwan2021-07-291-2/+2
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* better cleanup of user files on user deletionRobin Appelman2021-04-271-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Properly handle result when copying with failure and throw in testsJulius Härtl2021-01-051-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Bump icewind/streams from 0.7.1 to 0.7.2Christoph Wurst2020-12-291-2/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* use exceptions for error signaling in writeStreamRobin Appelman2020-07-231-4/+12
| | | | | | this remove the ambiguity when writing zero length files Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix moving files from external storage to object store trashbinRobin Appelman2020-07-231-9/+6
| | | | | | | | | | | | having the "cache rename" after the "storage move" caused the target to get the fileid from the source file, without taking care that the object is stored under the original file id. By doing the "cache rename" first, we trigger the "update existing file" logic while moving the file to the object store and the object gets stored for the correct file id Signed-off-by: Robin Appelman <robin@icewind.nl>
* filter files containing a hash in the path for ftp storagesRobin Appelman2020-07-101-1/+4
| | | | | | | | 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>
* add proper paths to locking exceptionsRobin Appelman2020-06-301-1/+1
| | | | | | | while some code paths do wrap the "raw" locking exception into one with a proper path, not all of them do by adding the proper path to the original exception we ensure that we always have the usefull information in out logs Signed-off-by: Robin Appelman <robin@icewind.nl>
* increase log level for storage self-testRobin Appelman2020-06-081-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* filter out blacklisted files in getDirectoryContentRobin Appelman2020-04-231-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add method to storage backends to get directory content with metadataRobin Appelman2020-04-201-2/+16
| | | | | | | | | | | | | | | | | 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>
* Merge pull request #20361 from nextcloud/write-stream-close-on-exceptionChristoph Wurst2020-04-151-3/+6
|\ | | | | Close the streams in `writeStream` even when there is an exception
| * Close the streams in `writeStream` even when there is an exceptionRobin Appelman2020-04-081-3/+6
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Format control structures, classes, methods and functionChristoph Wurst2020-04-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-2/+2
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix filename size, add commentGreta Doci2019-12-041-1/+3
| | | | Signed-off-by: Greta Doci <gretadoci@gmail.com>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * 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>
* handle moveFromStorage within the same storage even when storage wrappers ↵Robin Appelman2019-09-251-1/+29
| | | | | | | | | | are applied to the source storage the target storage doesn't need additional handling for wrappers as the wrappers implementation of moveFromStorage already deals with that Any storage based on local storage isn't affected by this as local storage already has it's own way of handling with this Signed-off-by: Robin Appelman <robin@icewind.nl>
* Do not log all locked exceptionsRoeland Jago Douma2019-07-261-3/+3
| | | | | | | | This can happen for valid reasons (multiple users writing at the same time) with for example the text app. Apps should properly handle it. No reason to log it by default. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* No need to propogate changes in appdataRoeland Jago Douma2018-12-051-1/+2
| | | | | | | | Right now we propogate a lof of changes in appdata. So for example we propogate each and every preview that is added to the system. This has no real added value as far as I can tell. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* fix writeStream for jail wrapperRobin Appelman2018-10-311-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* extend storage api to allow directly writing a stream to storageRobin Appelman2018-10-311-1/+18
| | | | | | | | | | | this removes the need for temporary storages with some external storage backends. The new method is added to a separate interface to maintain compatibility with storage backends implementing the storage interface directly (without inheriting common) Currently the interface is implemented for objectstorage based storages and local storage and used by webdav uploads Signed-off-by: Robin Appelman <robin@icewind.nl>
* always log locking errorsRobin Appelman2018-05-041-3/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move log constants to ILoggerArthur Schiwon2018-04-261-1/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* External storage test: log exceptionsRoland Tapken2018-02-111-0/+3
| | | | | | | | If an external storage test fails the exception's message is now written into the logfile (level INFO). Additionally, the stack trace is printed as DEBUG. This helps to resolve the reason for a failing connection. Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
* additional debug logging on smb copy/rename failuresRobin Appelman2017-12-181-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersMorris Jobke2017-11-061-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Replace wrong PHPDocsLukas Reschke2017-08-011-4/+5
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Merge pull request #3600 from coletivoEITA/masterRoeland Jago Douma2017-03-141-0/+7
|\ | | | | added method needsPartFile() in Storage