Skip to contents

Downloads a file to the remote SAS server.

Usage

sas_file_download(sas_path, local_path)

Arguments

sas_path

string; Path of file on remote SAS server to be download

local_path

string; Path to upload SAS file to on local machine.

Value

logical; value indicating if the operation succeeded.

See also

Examples

if (FALSE) { # interactive()
# connect to SAS
sas_connect()

# create an example file
local_path <- tempfile(fileext = ".txt")
cat("some example text", file = tempfile_path)

sas_path <- readline(
  "Please provide the full path to upload an example file to (e.g., ~/example.txt)."
)
sas_file_upload(local_path, sas_path)

# download the uploaded file
local_copy_path <- sub("\\.txt$", "_copy.txt", tempfile_path)
sas_file_download(sas_path, local_copy_path)

# cleanup
unlink(local_path)
unlink(local_copy_path)
sas_file_remove(sas_path)
}