sftp_list: List files and/or folders in an SFTP directory

Description Usage Arguments Value See Also Examples

View source: R/sftp_functions.R

Description

This function lists files, or folders, or both in the SFTP location specified by a list object created by calling sftp_connect. Convenience wrapper functions are available: sftp_listfiles and sftp_listdirs Questions? https://github.com/stenevang/sftp

Usage

1
2
3
sftp_list(sftp_connection = sftp_con, verbose = TRUE,
  curlPerformVerbose = FALSE, encoding = "UTF-8", type = "all",
  recurse = F)

Arguments

sftp_connection

A list created by calling sftp_connect Default value is sftp_con.

verbose

Logical. Turn on messages to console. Default is TRUE.

curlPerformVerbose

Logical. Turn on messages to console from RCurl::curlPerform. Default is FALSE.

encoding

Explicitly identifies the encoding of the content that is returned by the server in its response. Possible values are ‘UTF-8’ or ‘ISO-8859-1’. Default is 'UTF-8'.

type

One of "f", "file" (for list files), "d", "dir", "directory" (for list directories), "all" (for both files and directories, default).

recurse

Logical. Recurse directories? Default is FALSE.

Value

A dataframe

See Also

sftp_listfiles, sftp_listdirs, sftp

Examples

1
2
3
4
5
6
7
8
# minimal - rely on defaults
files_and_folders <- sftp_list(type = "all")

# explicit
files_and_folders <- sftp_list(sftp_connection = sftp_con,
                               verbose = TRUE,
                               curlPerformVerbose = FALSE,
                               type = "all")

stenevang/sftp documentation built on Oct. 25, 2019, 5:16 a.m.