aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Filesystem.php
Commit message (Collapse)AuthorAgeFilesLines
* Fix file_get_content signatures to make it clear it can return falseCôme Chilliet2023-04-271-1/+1
| | | | | | | In File::getContent, which must return a string, throw an Exception instead of returning false. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add missing taint analysis docblock comments, and improve escaping in some ↵Carl Schwan2023-04-241-0/+1
| | | | | | | methods Signed-off-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix return type of methods returning false on errorCôme Chilliet2023-04-031-8/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Improve typing for fopen/toTmpFileCôme Chilliet2023-04-031-3/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove unused method getLocalFolderCôme Chilliet2023-04-031-8/+0
| | | | | | It’s not used and not in any OCP interface/class. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Tidy up typing in OC\Files\ViewCôme Chilliet2023-04-031-42/+23
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm errorsCô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-4/+4
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* remove listeners to OC_Filesystem::(write|rename) old style hooksArthur Schiwon2022-09-261-19/+0
| | | | | | | - the events are not emitted anymore - OC_Filesystem::isBlacklisted() is not called from anywhere else Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Move CappedMemoryCache to OCPCarl Schwan2022-07-141-1/+1
| | | | | | | | This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* fixed when accessing static filesystem calls before setupRobin Appelman2022-03-241-4/+23
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* some file scanner performance improvementsRobin Appelman2022-03-171-2/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* type fixesRobin Appelman2022-03-041-14/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move user mountpoint setup to setupmanagerRobin Appelman2022-03-041-99/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* adjust tests to new fs setupRobin Appelman2022-03-041-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move teardown logic to SetupManagerRobin Appelman2022-03-041-12/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix fs cache test user setupRobin Appelman2022-02-091-0/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* pass user object during fs initRobin Appelman2022-02-091-7/+14
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* only setup part of the filesystem for appdata requestsRobin Appelman2022-02-091-19/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Return 404 when AJAX tries to list dir content but file givenMichaIng2022-01-261-1/+1
| | | | | | | | Due to a code mistake, the expected 404 return when AJAX tries to list a directory content with a non-directory file path given, does not happen. It instead fails with another exception. This commit restores the original intention to return 404 in the first place when passing a non-directory path with the "dir" parameter. Signed-off-by: MichaIng <micha@dietpi.com>
* Merge pull request #26347 from J0WI/clean-path-regexJohn Molakvoæ2021-10-221-4/+4
|\
| * Cleaner normalizePath regexJ0WI2021-03-271-4/+4
| | | | | | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Merge pull request #26344 from J0WI/fs-early-rootLukas Reschke2021-06-231-8/+8
|\ \ | | | | | | Return early if path is root
| * | Return early if path is rootJ0WI2021-04-051-8/+8
| | | | | | | | | | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-23/+0
|/ / | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* / getStorage can also return nullRobin Appelman2021-03-241-1/+1
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22520 from nextcloud/normalize-path-invalid-utf8Roeland Jago Douma2020-09-091-1/+1
|\ | | | | dont use `false` as cache key for non utf8 path in normalizePath
| * dont use `false` as cache key for non utf8 path in normalizePathRobin Appelman2020-08-311-1/+1
| | | | | | | | | | | | | | | | since `json_encode` returns `false` if it's input isn't utf8, all non utf8 paths passed to normalizePath will currently return the same cached result. Fixing this makes working with non utf8 storages a *little* bit more possible for apps Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Update license headers for Nextcloud 20 (again)Christoph Wurst2020-09-071-0/+1
|/ | | | | | | There are still lots of outdated headers, so time for another round of updates. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix: file quota was not applied in all caseskorelstar2020-08-201-2/+2
|
* ensure home storage is initialized on first setupRobin Appelman2020-07-091-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add visibility to all constantsChristoph Wurst2020-04-101-21/+21
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-101-48/+48
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all properties and move static keywordChristoph Wurst2020-04-101-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Try to use the display name of file transfersJoas Schilling2020-04-081-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-271-1/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-251-1/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the short array syntax, everywhereChristoph Wurst2020-03-261-8/+8
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix string doc type casingChristoph Wurst2018-11-151-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* expose storagefactory in server containerRobin Appelman2018-10-171-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Move normalizePath to regexes instead of loopingRoeland Jago Douma2018-10-101-25/+16
| | | | | | | | | | | | | This is IMO a bit more readable and it seems to make the code faster. Tested it on the company instance where there are over 3k calls to this function. It shaves off around 10ms. The advantage here is that the pattern gets optimized by php itsel and cached. Also looking for all patterns at the same time and especially no longer looping for /./ patterns should save time. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* move log constants to ILoggerArthur Schiwon2018-04-261-2/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Make normalized cache path largerRoeland Jago Douma2018-04-041-1/+1
| | | | | | | | | | | On larger instances with a large number of shares this can make a real impact as the default 512 entries are easily filled. Making this contain max 2048 entries has basically no effect on smaller installations (as they probably never hit the 512 now). But makes sure we don't evict entries in the larger case. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use index based string access for substr with length of 1Morris Jobke2018-01-261-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove unused functionsLukas Reschke2017-07-191-8/+0
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Remove unused use statementsMorris Jobke2017-04-221-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>