ftp_listDir: List files and/or directories within an ftp endpoint

View source: R/ftp_listDir.R

ftp_listDirR Documentation

List files and/or directories within an ftp endpoint

Description

For a specific ftp endpoint, list all top-level files and/or directories

Usage

ftp_listDir(arglist, include_fileInfo = TRUE, ncharlim = 3L)

Arguments

arglist

(reqiured) A list of parameters to pass to getURL, containing at minimum url.

include_fileInfo

(optional) Try to get file information, if files are found? Defaults to TRUE

ncharlim

(optional) Number of terminal characters after a dot, beyond which a character vector is no longer considered a file. Defaults to 3L.

Value

A list of length 3, the first two elements each a list of directories and files, respectively. If no valid values exist for either top-level return element, then NULL. The last element contains the root (host) url.

If present, files will have the parent directory appended as a name. Files that exist at the root level will be named with the input url.

See Also

Other ftp_functions: ftp_getBinPars(), ftp_makeParams(), ftp_parseMeta()

Examples

## Not run: 
library(RCurl)
my_arglist <- ftp_makeParams(host = "ftp.123.com", user = "myself", pwd = "my_pwd")
ftp_listDir(my_arglist)

## End(Not run)

slin30/wzMisc documentation built on Jan. 27, 2023, 1 a.m.