upload_ftp: Upload to an FTP server via 'curl'

View source: R/command.R

upload_ftpR 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"),
  solaris = pkg_available("rhub")
)

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.

solaris

Whether to also upload the package to the Rhub server to check it on Solaris.

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().


yihui/xfun documentation built on April 29, 2024, 12:16 p.m.