Description Usage Arguments Value See Also Examples
View source: R/sftp_functions.R
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
1 | sftp_changedir(tofolder, current_connection_name = "sftp_con", verbose = TRUE)
|
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 |
verbose |
Logical. Turn on messages to console. Default is TRUE |
The function returns TRUE after successful change of directory.
sftp_makedir, sftp_removedir, sftp_rename, sftp
1 2 3 4 5 6 7 8 9 10 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.