aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node
Commit message (Collapse)AuthorAgeFilesLines
...
| * Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-3/+3
| | | | | | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* | Merge pull request #32961 from nextcloud/more-debug-lazyuserfolderCôme Chilliet2023-05-152-6/+18
|\ \ | |/ |/| Make it easier to debug issue #32304
| * Add back missing slash in LazyUserFolder pathCôme Chilliet2023-05-091-1/+1
| | | | | | Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
| * Make it easier to debug issue #32304Carl Schwan2023-05-042-7/+19
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Merge pull request #37961 from nextcloud/poc/noid/systemtags-perfArthur Schiwon2023-05-111-32/+4
|\ \ | | | | | | SystemTags endpoint to return tags used by a user with meta data
| * | refactor: remove SystemTag logic from Folder into QuerySearchHelperArthur Schiwon2023-05-091-52/+1
| | | | | | | | | | | | | | | | | | | | | - adds OC\SystemTag\SystemTagsInFilesDetector where the search logic is moved to Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | feat: specify media type via url path: systemtags-current/$mediaTypeArthur Schiwon2023-05-091-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - only the media part of the mime type can be search, but not the full mime type. It can be added, should it become necessary. - thus fixes previously hardcoded selector for image/ types - also fixes a return type hint - adds a return type hint Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | PoC: SystemTags endpoint to return tags used by a user with meta dataArthur Schiwon2023-05-091-24/+40
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target case is photos app: when visiting the tags category, all systemtags of the whole cloud are retrieved. In subequent steps the next tag is requested until the browser view is filled with tag tiles (i.e. previews are requested just as well). With this approach, we incorpoate the dav search and look for user related tags that are used by them, and already returns the statistics (number of files tagged with the respective tag) as well as a file id for the purpose to load the preview. This defaults to the file with the highest id. Call: curl -s -u 'user:password' \ 'https://my.nc.srv/remote.php/dav/systemtags-current' \ -X PROPFIND -H 'Accept: text/plain' \ -H 'Accept-Language: en-US,en;q=0.5' -H 'Depth: 1' \ -H 'Content-Type: text/plain;charset=UTF-8' \ --data @/home/doe/request-systemtag-props.xml With request-systemtag-props.xml: <?xml version="1.0" encoding="UTF-8"?> <d:propfind xmlns:d="DAV:"> <d:prop xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"> <oc:id/> <oc:display-name/> <oc:user-visible/> <oc:user-assignable/> <oc:can-assign/> <nc:files-assigned/> <nc:reference-fileid/> </d:prop> </d:propfind> Example output: … <d:response> <d:href>/master/remote.php/dav/systemtags/84</d:href> <d:propstat> <d:prop> <oc:id>84</oc:id> <oc:display-name>Computer</oc:display-name> <oc:user-visible>true</oc:user-visible> <oc:user-assignable>true</oc:user-assignable> <oc:can-assign>true</oc:can-assign> <nc:files-assigned>42</nc:files-assigned> <nc:reference-fileid>924022</nc:reference-fileid> </d:prop> <d:status>HTTP/1.1 200 OK</d:status> </d:propstat> </d:response> <d:response> <d:href>/remote.php/dav/systemtags/97</d:href> <d:propstat> <d:prop> <oc:id>97</oc:id> <oc:display-name>Bear</oc:display-name> <oc:user-visible>true</oc:user-visible> <oc:user-assignable>true</oc:user-assignable> <oc:can-assign>true</oc:can-assign> <nc:files-assigned>1</nc:files-assigned> <nc:reference-fileid>923422</nc:reference-fileid> </d:prop> <d:status>HTTP/1.1 200 OK</d:status> </d:propstat> </d:response> … Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* / Make sure to never trigger files hooks on a null pathCôme Chilliet2023-05-041-1/+4
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix file_get_content signatures to make it clear it can return falseCôme Chilliet2023-04-271-5/+7
| | | | | | | 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>
* fix: Use proper path when creating node instancesJulius Härtl2023-04-171-1/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #36836 from nextcloud/fix/view-type-cleanupCôme Chilliet2023-04-051-1/+1
|\ | | | | Tidy up typing in OC\Files\View
| * Improve typing for fopen/toTmpFileCôme Chilliet2023-04-031-1/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix inherited parameter namesjld31032023-04-032-4/+4
|/ | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* Merge pull request #33061 from ibpl/master-IB#1121253Côme Chilliet2023-03-141-7/+8
|\ | | | | Paths added to messages and message cleanup
| * Merge masterPawel Boguslawski2022-11-044-17/+28
| |\
| * | Update Folder.phpPaweł Bogusławski2022-07-291-0/+1
| | | | | | | | | | | | Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
| * | Update Folder.phpPaweł Bogusławski2022-07-291-1/+0
| | | | | | | | | | | | Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
| * | Update lib/private/Files/Node/Folder.phpPaweł Bogusławski2022-07-291-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Vincent Petry <vincent@nextcloud.com> Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
| * | Paths added to messages and message cleanupPawel Boguslawski2022-07-291-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mod adds path to error messages. Without it it's difficult for example to find what path causes permission problems. Related: https://help.nextcloud.com/t/ocp-files-notpermittedexception-could-not-create-folder/133818 Related: https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/ Author-Change-Id: IB#1121253 Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
* | | optimize LazyUserFolder::getMountPointRobin Appelman2023-02-132-3/+17
| | | | | | | | | | | | | | | | | | no need to do a full setup Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | only fetch the data for mounts inside a folder when neededRobin Appelman2023-02-094-32/+38
| | | | | | | | | | | | | | | | | | | | | | | | for most operations we don't actually care about any mounts inside a folder, only for metadata that needs to propagate across storage boundaries (size, etag, mtime) do we need all the submount info. By only loading this data when needed we can save a bunch of storage setup in a number of cases Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Type sizes as int|float throughout the code baseCôme Chilliet2023-02-075-7/+7
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | | Merge pull request #34994 from Glandos/fileinfo_perfSimon L2022-11-111-3/+3
|\ \ \ | | | | | | | | [Performance] Test valid path only if file info has to be retrieved
| * | | Test valid path only if file info has to be retrievedGlandos2022-11-061-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
* | | | Make sure that path is normalized and then checked,Côme Chilliet2022-11-101-7/+8
|/ / / | | | | | | | | | | | | | | | and not the other way around Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | / Filter out old files when trying to get recent filesCarl Schwan2022-09-051-27/+55
| |/ |/| | | | | | | | | | | Only do so when asking for less than 100 files and having an offset equal to 0. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | remove leading slash for search results at mountpoint rootRobin Appelman2022-08-291-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Only pass parent if paths matchJulius Härtl2022-08-241-3/+5
| | | | | | | | | | | | | | As the user folder might be initialized by the root from two levels down the hierarchy, passing this as a parent only works if the path matches Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Avoid extra query for the parent node if we can pass it alongJulius Härtl2022-08-242-9/+20
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Fix typos in lib/private subdirectoryluz paz2022-07-272-2/+2
| | | | | | | | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* | 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>
* | Fix PHP 8.2 warnings about undeclared propertiesCôme Chilliet2022-06-212-2/+0
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* log stacktrace for 'Backends provided no user object'Arthur Schiwon2022-04-201-1/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* perform a setup if we can't find any mounts containing a fileRobin Appelman2022-04-111-0/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* more preset metadata for LazyUserFolderRobin Appelman2022-04-082-0/+14
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* allow reusing known folder info when getting directory contentsRobin Appelman2022-04-061-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* rename cached fileinfo on renameRobin Appelman2022-04-041-0/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* dont needlessly resolve path when getting internalPath/storage from NodeRobin Appelman2022-04-041-7/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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>