download_xnat_file: Download XNAT file

View source: R/xnat_api.R

download_xnat_fileR Documentation

Download XNAT file

Description

Download a single file from XNAT

Usage

download_xnat_file(conn, ...)

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

## 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)

neuroconductor/Rxnat documentation built on April 1, 2024, 9:44 p.m.