ftp_upload: Upload files to an FTP server

Description Usage Arguments Value Examples

View source: R/ftp_upload.R

Description

Upload files to an FTP server

Usage

1
ftp_upload(url, path, messages = FALSE, ...)

Arguments

url

(character) URL for the file on the FTP server

path

(character) path

messages

(logical) verbose messages. Default: FALSE

...

further args passed on to curl

Value

string, path to the file on disk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
file <- tempfile(fileext = ".csv")
row.names(mtcars) <- NULL
write.csv(mtcars, file = file, row.names = FALSE)
read.csv(file)

(x <- ftp_upload(url = "demo.wftpserver.com", path = file))
cat(rawToChar(x$headers))
cat(rawToChar(x$content))


file <- tempfile(fileext = ".png")
row.names(mtcars) <- NULL
(x <- ftp_upload(url = "ftp://speedtest.tele2.net/upload", path = file))
cat(rawToChar(x$headers))
cat(rawToChar(x$content))

## End(Not run)

sckott/ftp documentation built on Sept. 3, 2020, 7:22 p.m.