sftp_changedir: Move to another directory in an SFTP account

Description Usage Arguments Value See Also Examples

View source: R/sftp_functions.R

Description

Change your "current directory" used by the sftp functions. The function uses and modifies the connection credentials in a list object created by calling sftp_connect. Questions? https://github.com/stenevang/sftp

Usage

1
2
sftp_changedir(tofolder, current_connection_name = "sftp_con",
  verbose = TRUE, curlPerformVerbose = FALSE)

Arguments

tofolder

A character vector of length 1 containing the name of a folder to where you want to go. The folder(s) will be looked for below the folder where you are currently standing according to the sftp connection list object you are using (default 'stfp_con'). A subfolder or a sub-subfolder etc can be specified in one single operation by supplying a path, like "folder1/folder2/folder3". To move up one level in the folder hierarchy, use ".." To go to the root folder, use "root".

current_connection_name

A string giving the name of the SFTP connection list object currently used, created by calling sftp_connect. Default is "sftp_con".

verbose

Logical. Turn on messages to console. Default is TRUE

curlPerformVerbose

Logical. Turn on messages to console form curlPerform. Default is FALSE.

Value

The function returns TRUE after successful change of directory.

See Also

sftp_makedir, sftp_removedir, sftp_rename, sftp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# minimal - move up one level, rely on defaults
sftp_changedir("..")

# minimal - to to root, rely on defaults
sftp_changedir("root")

# explicit - change to a directory at the end of a multi-level path
sftp_changedir(tofolder = "level1/folder2/directory3",
               current_connection_name = "sftp_con",
               verbose = TRUE,
               curlPerformVerbose = FALSE)

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