Description Usage Arguments Value See Also Examples
View source: R/sftp_functions.R
Specify a current name and a new name, for a file or folder existing in an SFTP account.
While folders must be empty when using sftp_removedir, that is not the case with
sftp_rename
- non-empty folders can be renamed.
sftp_rename
internally calls RCurl::curlPerform
Questions? https://github.com/stenevang/sftp
1 2 3 4 5 6 7 8 | sftp_rename(
from,
to,
sftp_connection = sftp_con,
verbose = TRUE,
curlPerformVerbose = FALSE,
curl_options = list()
)
|
from |
A single name of an existing file or folder. If a vector of names is supplied, only the first value will be used, and there will be a warning. |
to |
A single name of an existing file or folder. If a vector of names is supplied, only the first value will be used, and there will be a warning. |
sftp_connection |
A list object created by calling sftp_connect.
Default is |
verbose |
Logical. Turn on messages to console. Default is TRUE |
curlPerformVerbose |
Logical. Turn on messages to console form curlPerform. Default is FALSE. |
curl_options |
A list of named values with names as listed by
|
The function returns TRUE if successful.
sftp_download, sftp_upload, sftp_delete, sftp
1 2 3 4 5 6 7 8 9 | # minimal - rely on defaults
sftp_rename("oldname.csv", "newname.csv")
# explicit - rename a folder
sftp_rename(from = "old_folder_name",
to = "new_folder_name",
sftp_connection = sftp_con,
verbose = TRUE,
curlPerformVerbose = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.