Skip to contents

List Files on the Nextcloud Server

Usage

list_files(
  path = "",
  pattern = NULL,
  recursive = FALSE,
  full_info = FALSE,
  user = nextcloud_user(),
  auth = nextcloud_auth(),
  max_depth = NA,
  ...
)

Arguments

path

path to the nextcloud folder to be listed

pattern

an optional regular expression. Only file names which match the regular expression will be returned.

recursive

if TRUE the contents of subfolders are listed as well, up to the given max_depth.

full_info

if TRUE the full file information is returned as a data frame. If FALSE (the default) only the (relative) file paths are returned as a vector of character.

user

user name, by default taken from the environment variable "NEXTCLOUD_USER".

auth

authentication header as provided by kwb.nextcloud:::nextcloud_auth

max_depth

maximum recursion depth if recursive = TRUE. By default max_depth is NA meaning that the function behaves "fully recursive".

...

further arguments passed to kwb.nextcloud:::list_cloud_files, such as silent = TRUE

Value

vector of character or data frame, each with attribute "root" being set to the value of path.