R: Upload to an FTP server via 'curl'

upload_ftp {xfun} | R Documentation

## Upload to an FTP server via `curl`

### Description

The function `upload_ftp()` runs the command `curl -T file server` to upload a file to an FTP server if the system command `curl` is available, otherwise it uses the R package curl. The function `upload_win_builder()` uses `upload_ftp()` to upload packages to the win-builder server.

### Usage

    upload_ftp(file, server, dir = "")

    upload_win_builder(
      file = pkg_build(),
      version = c("R-devel", "R-release", "R-oldrelease"),
      server = c("ftp", "https")
    )

### Arguments

`file` | Path to a local file.
`server` | The address of the FTP server. For `upload_win_builder()`, `server = 'https'` means uploading to `'https://win-builder.r-project.org/upload.aspx'`.
`dir` | The remote directory to which the file should be uploaded.
`version` | The R version(s) on win-builder.

### Details

These functions were written mainly to save package developers the trouble of going to the win-builder web page and uploading packages there manually.

### Value

Status code returned from `system2()` or `curl::curl_fetch_memory()`.

[Package xfun version 0.23 Index]