opal.file_download | R Documentation |
Download a file or a folder from the Opal file system.
opal.file_download(opal, source, destination = NULL, key = NULL)
opal |
Opal object. |
source |
Path to the file in the Opal file system. |
destination |
Path to the file to be written. If ommitted, file with same name in the working directory will be written. |
key |
File encryption key: downloaded file will be a zip file with content encrypted (use 7zip to decrypt). |
Other file functions:
opal.file()
,
opal.file_cp()
,
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()
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.