aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node
Commit message (Collapse)AuthorAgeFilesLines
...
* optimize getById on LazyUserFolder to not require a full fs setupRobin Appelman2022-04-045-81/+109
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* split out some path manipulation logicRobin Appelman2022-04-043-28/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #31609 from nextcloud/fix/migrate-away-from-iloggerCôme Chilliet2022-03-291-6/+3
|\ | | | | Migrate from ILogger to LoggerInterface in lib/private
| * Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-6/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | caching of userfolderRobin Appelman2022-03-241-4/+2
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fmtRobin Appelman2022-03-242-5/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | improve lazy UserFolderRobin Appelman2022-03-242-6/+69
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | return a lazy folder from Root::getUserFolderRobin Appelman2022-03-241-9/+13
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | allow setting some metadata in the lazyfolder without having to get the real ↵Robin Appelman2022-03-241-1/+24
|/ | | | | | folder Signed-off-by: Robin Appelman <robin@icewind.nl>
* type fixesRobin Appelman2022-03-041-5/+5
| | | | 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-25/+25
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* store mountprovider for each mount in the mounts tableRobin Appelman2022-02-232-7/+8
| | | | | | this enabled more fine grained filesystem setup Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix Folder->getById() when a single storage is mounted multiple timesRobin Appelman2021-07-281-15/+29
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* dont include folder being search in in the resultsRobin Appelman2021-07-021-1/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* update tests and fix some edge cases around new searchRobin Appelman2021-06-141-5/+22
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* some cleanup and documentationRobin Appelman2021-06-141-25/+16
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* perform file search in a single queryRobin Appelman2021-06-141-51/+20
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-049-10/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* adjust testsRobin Appelman2021-04-211-1/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use search query for Folder::getRecentRobin Appelman2021-04-211-160/+36
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fail when creating new files with an empty pathJulius Härtl2021-04-201-0/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #26219 from nextcloud/relative-path-nullRoeland Jago Douma2021-03-301-2/+2
|\ | | | | getRelativePath can return null
| * getStorage can also return nullRobin Appelman2021-03-241-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * getRelativePath can return nullRobin Appelman2021-03-241-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix return value of Root::getRobin Appelman2021-03-261-1/+1
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* handle ordering in folder searchRobin Appelman2021-03-191-35/+27
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* folder filtering in sqlRobin Appelman2021-03-191-16/+20
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* cleanup fileinfo creationRobin Appelman2021-03-191-9/+16
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* formatRobin Appelman2021-03-181-1/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* handle limit and offset in folder file searchRobin Appelman2021-03-181-6/+51
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* unify handling of Folder::search methods into "new" query objectsRobin Appelman2021-03-181-45/+61
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-182-3/+3
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-165-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't leave cursors open when tests failJoas Schilling2020-11-091-1/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-243-2/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22237 from ↵Roeland Jago Douma2020-08-201-1/+1
|\ | | | | | | | | nextcloud/bugfix/noid/allow_putContent_empty_string Allow writing empty content to new file
| * Allow writing empty content to new fileGeorg Ehrke2020-08-131-1/+1
| | | | | | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* | Improve recent file fetchingRoeland Jago Douma2020-08-181-6/+51
|/ | | | | | | | | | | | | | | | Fixes #16876 Before we'd just fetch everything from all storages we'd have access to. Then we'd sort. And filter in php. Now this of course is tricky if a user shared just a file with you and then has a ton of activity. Now we try to contruct the prefix path. So that the filtering can happen right away in the databae. Now this will make the DB more busy. But it should help overall as in most cases less queries are needed then etc. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add lazy events for the Node APIRoeland Jago Douma2020-05-281-23/+80
| | | | | | | | | | | Right now if you want to get events via the Node API you have to have a real instance of the Root. Which in turns sets up the whole FS. We should make sure this is done lazy. Else enabling the preview generator for example makes you setup the whole FS on each and every authenticated call. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* generalize the "lazy folder" conceptRobin Appelman2020-05-112-456/+497
| | | | | | makes it easy to use lazy intialized folder in other places Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-103-3/+1
| | | | | | | | | | | | | | | 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>
* Properly hint exceptions thrown by getUserFolderJulius Härtl2020-04-031-2/+4
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-314-0/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-265-18/+18
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Create SimpleFile only when writing the contentRobin Appelman2020-02-283-4/+10
| | | | | | | | | | | | | | | | | | | | instead of first creating an empty file and then writing the content. This solves the overhead of creating an empty file with the common pattern: ```php $file = $simpleFilder->newFile('foo.txt'); $file->putContent('bar.txt'); ``` roughly halving the number of storage and database operations that need to be done when creating a `SimpleFile`. This is not automatically done with `File` because that has a more complex api which I'm more hesitant to touch. Instead the `Folder::newFile` api has been extended to accept the content for the new file. In my local testing, the overhead of first creating an empty file took about 20% of the time for preview generation Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersChristoph Wurst2019-12-058-8/+18
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Allow filtering the search results to the users home storageRobin Appelman2019-12-031-15/+23
| | | | | | | | | | | | | | | | | | | | This is done by adding a ```xml <d:eq> <d:prop> <oc:owner-id/> </d:prop> <d:literal>$userId</d:literal> </d:eq> ``` clause to the search query. Searching by `owner-id` can only be done with the current user id and the comparison can not be inside a `<d:not>` or `<d:or>` statement Signed-off-by: Robin Appelman <robin@icewind.nl>