sftp_list: List Files and/or Folders in an SFTP Directory

View source: R/sftp.R

sftp_listR Documentation

List Files and/or Folders in an SFTP Directory

Description

sftp_list lists files, folders, or both in the SFTP location specified by a list object created using sftp_connect. Convenience wrapper functions are available in sftp_listfiles and sftp_listdirs

Usage

sftp_list(
  sftp_connection = get("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", code"file" for listing files; "d", "dir", "directory" for listing directories; or "all" for both files and directories, the default.

recurse

Logical. Recurse directories? Default is FALSE.

Value

A tibble

Author(s)

Theodor Stenevang Klemming

See Also

sftp_listfiles, sftp_listdirs

Other sftp: sftp_changedir(), sftp_connect(), sftp_delete(), sftp_download(), sftp_listdirs(), sftp_listfiles(), sftp_makedir(), sftp_removedir(), sftp_rename(), sftp_upload()

Examples


## Not run: 
# 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")

## End(Not run)


jesse-smith/coviData documentation built on Jan. 14, 2023, 11:08 a.m.