Description Usage Arguments Value See Also Examples
View source: R/sftp_functions.R
Specify a file name or a vector of file names to delete in an SFTP account.
sftp_delete
internally calls RCurl::curlPerform
Questions? https://github.com/stenevang/sftp
1 2 3 4 5 6 7 | sftp_delete(
file,
sftp_connection = sftp_con,
verbose = TRUE,
curlPerformVerbose = FALSE,
curl_options = list()
)
|
file |
A vector of one or more file names that exist on the SFTP url.
Wildcard is not supported in order to minimize the risk of accidental deletion.
When a large portion of the files currently on the SFTP url needs to be deleted, you can create
an input value for |
sftp_connection |
A list object 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. |
curl_options |
A list of named values with names as listed by
|
The function returns the number of files deleted.
sftp_download, sftp_upload, sftp_rename, sftp
1 2 3 4 5 6 7 8 | # minimal - delete single file and rely on defaults
sftp_delete("my_bad_file.csv")
# explicit - delete several files in a vector
sftp_delete(file = files$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.