summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node
Commit message (Collapse)AuthorAgeFilesLines
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-044-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(files): copy live photosMaxence Lange2024-03-081-21/+29
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* perf: cache path by id to speedup getting nodes by idRobin Appelman2024-03-041-2/+28
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* perf: switch places that always use the first getById result to getFirstNodeByIdRobin Appelman2024-03-041-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add interface to get only a single node by id instead of all nodes for ↵Robin Appelman2024-03-046-14/+23
| | | | | | | | the id this should be enough in most(?) cases and makes efficient implementation and caching easier Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: rename users to account or personVincent Petry2024-02-131-1/+1
| | | | | | Replace translated text in most locations Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Synchronize operation on live photo filesLouis Chemineau2023-11-291-2/+2
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-233-5/+5
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix(events): Make sure all `\OCP\Files::…` events are emitted with the ↵Joas Schilling2023-11-091-1/+8
| | | | | | same data Signed-off-by: Joas Schilling <coding@schilljs.com>
* IFilesMetadataMaxence Lange2023-11-071-2/+0
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* IFilesMetadataMaxence Lange2023-11-073-1/+21
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* fix(Folder): Allow filename to be '0'Marcel Klehr2023-10-221-1/+1
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* add method to create a node from cache entry + mountpointRobin Appelman2023-09-193-1/+34
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: Pass parent to NonExistingFile instancesJulius Härtl2023-09-131-1/+10
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* reuse isValidPath from FilesystemRobin Appelman2023-09-042-15/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* make LazyFolder::get not load the real folder if we know the pathRobin Appelman2023-09-044-27/+56
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add IFileInfo::getParentIdRobin Appelman2023-09-042-7/+15
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* make Node::getParent lazyRobin Appelman2023-09-041-1/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* allow passing more info to lazy folderRobin Appelman2023-09-041-0/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: prevent sharing permissions on user root folderJohn Molakvoæ2023-09-011-1/+2
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* fix!: Move getEventDispatcher usage to IEventDispatcherJoas Schilling2023-07-281-2/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: Move Node HookConnecter events to IEventDispatcherJoas Schilling2023-07-271-25/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(node): non-existing folder is not searchableArthur Schiwon2023-07-131-0/+4
| | | | | | | the previosuly introduced searchBySystemTag was not overwritten in NonExistingFolder and could run the inherited method. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: Replace \OC::$server->query with \OCP\Server::get in /libChristoph Wurst2023-07-061-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #37969 from nextcloud/poc/noid/systemtags-perf-tag-endpointJulius Härtl2023-06-282-0/+9
|\
| * fix: cominbation of small fixesArthur Schiwon2023-06-211-2/+2
| | | | | | | | | | | | | | | | - possible null return - parameter name mismatch in implementation - incomplete unit test Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * feat: add searchBySystemTag as PHP APIArthur Schiwon2023-06-211-0/+4
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * fix: change if with conditionless else to switch; and a parameter valueArthur Schiwon2023-06-211-1/+1
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * use efficient tag retrieval on DAV report requestArthur Schiwon2023-06-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - uses DAV search approach against valid files joined by systemtag selector - reduced table join for tag/systemtag search - supports pagination - no changes to the output formats or similar Example request body: <?xml version="1.0"?> <oc:filter-files xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns" xmlns:ocs="http://open-collaboration-services.org/ns"> <d:prop> <d:getcontentlength/> <d:getcontenttype/> <d:getetag/> <d:getlastmodified/> <d:resourcetype/> <nc:face-detections/> <nc:file-metadata-size/> <nc:has-preview/> <nc:realpath/> <oc:favorite/> <oc:fileid/> <oc:permissions/> <nc:nbItems/> </d:prop> <oc:filter-rules> <oc:systemtag>32</oc:systemtag> </oc:filter-rules> <d:limit> <d:nresults>50</d:nresults> <nc:firstresult>0</nc:firstresult> </d:limit> </oc:filter-files> Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | ci: pro forma check of existence of internal methodArthur Schiwon2023-06-211-7/+9
| | | | | | | | | | | | | | createNode() is protected and used by Folder, but being an internal-only method it shall not be exposed in the Folder or IRootFolder interface. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | refactor: declare getMount() and getMountsIn() at IRootFolderArthur Schiwon2023-06-213-15/+8
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | chore: ugly type jugglingArthur Schiwon2023-06-213-13/+18
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix: add typehine for IRootFolderArthur Schiwon2023-06-211-7/+5
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_privateRobin Appelman2023-06-011-3/+3
|\ | | | | Refactors "strpos" calls in lib/private to improve code readability.
| * 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
| |\