Learn R Programming

rdav (version 0.3.0)

wd_dir: 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)

Value

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

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

Examples

Run this code
if (FALSE) {

# 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)

}

Run the code above in your browser using DataLab