download_xnat_file: Download XNAT file

Description Usage Arguments Value Examples

View source: R/xnat_api.R

Description

Download a single file from XNAT

Usage

1

Arguments

conn

The XNAT connection returned by a xnat_connect call

...

file_path Path to the file to be downloaded destfile Destination filename prefix Prefix the file name with this (prevents overwriting of same name files in case function is used to download multiple scan types at once) verbose Should progress be added to download? error Should function error if download failed?

Value

Display path to the downloaded file

Examples

1
2
3
4
5
6
7
## file_path is retrieved using the get_scan_resources() function
## Not run: 
xnat_central_conn <- xnat_connect('https://central.xnat.org', xnat_name="CENTRAL")
r <- get_scan_resources(xnat_central_conn,'CENTRAL_E00760')
download_xnat_file(xnat_central_conn,r$URI[1])

## End(Not run)

Rxnat documentation built on Aug. 19, 2021, 5:06 p.m.