Skip to content

Add optional WebDav propfind properties to count sub elements - #31193

Merged
julien-nc merged 1 commit into
masterfrom
enh/webdav-propfind-count-sub-elements
Mar 21, 2022
Merged

Add optional WebDav propfind properties to count sub elements#31193
julien-nc merged 1 commit into
masterfrom
enh/webdav-propfind-count-sub-elements

Conversation

@julien-nc

@julien-ncjulien-nc commented Feb 15, 2022

Copy link
Copy Markdown
Member

This allows requesting {http://owncloud.org/ns}contained-folder-count and {http://owncloud.org/ns}contained-files-count PROPFIND properties which results in getting the number of files and directories contained by the element:

<nc:contained-folder-count>10</nc:contained-folder-count>
<nc:contained-file-count>58</nc:contained-file-count>

This can be useful in a folder tree view of a WebDav client to know in advance if a directory can be expanded without having to use depth=2 and make the Dav response potentially a lot bigger.

@julien-ncjulien-nc added this to the Nextcloud 24 milestone Feb 15, 2022
@julien-nc
julien-nc requested review from a team, CarlSchwan, PVince81 and juliusknorr and removed request for a teamFebruary 15, 2022 15:52
Comment threadapps/dav/lib/Connector/Sabre/FilesPlugin.php Outdated
@julien-nc
julien-ncforce-pushed the enh/webdav-propfind-count-sub-elements branch from 9322917 to 38fa7faCompareFebruary 15, 2022 16:10
Comment threadapps/dav/lib/Connector/Sabre/FilesPlugin.php Outdated
Comment threadapps/dav/lib/Connector/Sabre/FilesPlugin.php
Comment threadapps/dav/lib/Connector/Sabre/FilesPlugin.php
@PVince81PVince81 added the pending documentation This pull request needs an associated documentation update label Feb 16, 2022
@PVince81

Copy link
Copy Markdown
Member

@eneiluj once the spec is clear, please also add those to the documentation

@julien-nc
julien-ncforce-pushed the enh/webdav-propfind-count-sub-elements branch from 38fa7fa to fa709a0CompareFebruary 16, 2022 09:31
@julien-nc

Copy link
Copy Markdown
MemberAuthor

@PVince81 Sure.
And if you have a better idea for the prop names, fine by me.

@juliusknorr

Copy link
Copy Markdown
Member

How about contained-file-count and contained-folder-count for the naming?

@julien-nc

Copy link
Copy Markdown
MemberAuthor

@juliushaertl Yes, much better, thanks.

@PVince81 Documentation PR: nextcloud/documentation#8140

Comment threadapps/dav/lib/Connector/Sabre/FilesPlugin.php Outdated
…es inside a folder
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@julien-nc
julien-ncforce-pushed the enh/webdav-propfind-count-sub-elements branch from bfc8ede to 71a9ebcCompareMarch 19, 2022 20:23
@julien-nc
julien-nc merged commit b85bdf4 into masterMar 21, 2022
@julien-nc
julien-nc deleted the enh/webdav-propfind-count-sub-elements branch March 21, 2022 10:33
@julien-nc

Copy link
Copy Markdown
MemberAuthor

/backport to stable23

@julien-nc

Copy link
Copy Markdown
MemberAuthor

/backport to stable22

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancementfeature: davpending documentationThis pull request needs an associated documentation update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@julien-nc@PVince81@juliusknorr@tcitworld@tobiasKaminsky