KWB-R / kwb.nextcloud

R Package For Accessing Nextcloud Using WebDAV API
https://kwb-r.github.io/kwb.nextcloud
MIT License
6 stars 3 forks source link

Add "full_path" to kwb.nextcloud:::list_files() output dataframe #7

Closed mrustl closed 4 years ago

mrustl commented 4 years ago

Initially the "href" output started with: "/remote.php/dav/files/username/..../start-path/..."

Now the content of "href" starts with "start-path/...."

Would be good to have the full_path starting after the "username".

hsonne commented 4 years ago

I want to keep the returned paths short. The path to the parent of the listed directory is now returned in the attribute "root". The full paths can be retrieved by prepending this root to the returned (relative) file paths (as already done in kwb.budget, see there):

https://github.com/KWB-R/kwb.budget/blob/a673522a47166d3f7793781c7ee3e0ae727df6ab/R/.read_budget-files.R#L32

Maybe href is not a good name any more for the column containing the relative file paths.

mrustl commented 4 years ago

Solved with "root" attribute (https://github.com/KWB-R/kwb.nextcloud/commit/104791a7397c38cf0c67e8c5165e3c9552ac841c)