wd_dir: Lists the content of a WebDAV directory

View source: R/webdav.R

wd_dirR Documentation

Lists the content of a WebDAV directory

Description

Lists the content of a WebDAV directory

Usage

wd_dir(req, directory = "", full_names = FALSE, as_df = FALSE)

Arguments

req

request handle obtained from wd_connect

directory

directory path

full_names

if TRUE, the directory path is prepended to the file names to give a relative file path (relevant only if as_df is FALSE)

as_df

if TRUE outputs a data.frame with file information

Value

a vector of filenames or a dataframe (when as_df is TRUE) with detailed file information (filename, path, isdir, size, lastmodified)

Examples

## Not run: 

# lists names of files and directories in the main directory
wd_dir(r)

# lists names of files and directories in the subdirectory "mydirectory"
wd_dir(r, "mydirectory")

# lists names of files and directories with the relative path
wd_dir(r, "mydirectory", full_names=TRUE)

# returns a data.frame with the columns filename, size and isdir (whether
# it's a directory or file
wd_dir(r, "mydirectory", as_df=TRUE)


## End(Not run)

rdav documentation built on Oct. 15, 2025, 3 p.m.