transfer_curl: Transfer content between file systems via cURL

View source: R/transfer.R

transfer_curlR Documentation

Transfer content between file systems via cURL

Description

transfer_curl will connect to the (secure) file transfer protocol available with cURL and transfer (upload or download) a specific file of interest.

Usage

transfer_curl(
  file = NULL,
  direction = NULL,
  connection = NULL,
  handle_options = list(),
  drop_location = NULL
)

Arguments

file

Character string. When uploading, should be the file path and name, when downloading it should just be the file name and extension.

direction

Character string, either 'upload' or 'download'.

connection

Character string that is used to connect to the desired file system.

handle_options

List of names elements for the cURL handle (for sftp connections, typically username and password are provided).

drop_location

Character string that provides the path to place the downloaded file from winSCP.

Details

transfer_curl is a thin wrapper around curl functionality; more specifically, the core process uses curl_download and curl_upload. cURL requires a 'handle' to be specified, which as the name suggests, specifies how cURL will 'handle' the server request. Details such as username, password, verbose can be specified in the handle. See the examples for some common patterns. A possible limitation is the transfer speed of this process. The default transfer speed as controlled through URL options; if you have over several MBs to transfer, try adjusting the buffersize, upload_buffersize, max_recv_speed_large, and max_send_speed_large options passed to the handle_options parameter. Use curl_options to see what options are available, if some are expected but not found, consider upgrading cURL.

Value

Dataset will be saved in the file system.


al-obrien/farrago documentation built on April 14, 2023, 6:20 p.m.