Download a file or a folder from the Opal file system, optionally encrypted with provided key. If the file is a folder and/or it is to be encrypted, the resulting downloaded file will be a zip archive file. The process of preparing this file bundle will be done in a background task. Then the result of this task, if successful, will be downloaded.
See also
Other file functions:
opal.file(),
opal.file_cp(),
opal.file_info(),
opal.file_ls(),
opal.file_mkdir(),
opal.file_mkdir_tmp(),
opal.file_mv(),
opal.file_read(),
opal.file_rm(),
opal.file_unzip(),
opal.file_upload(),
opal.file_write()
Examples
if (FALSE) { # \dontrun{
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
# download a file
opal.file_download(o, '/home/administrator/joins/join-src-3.csv')
# download a file encrypted by a key: resulting file is a zip with an encrypted content
opal.file_download(o, '/home/administrator/export/some-data.csv',
destination='some-data.zip', key='AZF57893FBDE')
# download, create destination folder and rename file
opal.file_download(o, '/home/administrator/spss/DatabaseTest.sav', 'spss/test.sav')
# download a folder
opal.file_download(o, '/home/administrator/export', 'export.zip')
opal.logout(o)
} # }