opalr (version 3.4.1)

opal.file_upload: Upload a file or a folder

Description

Upload a file or a folder into the Opal file system. Creates the destination folder (and parents) when necessary. Hidden files and folders (with name starting with dot) can be excluded.

Usage

opal.file_upload(opal, source, destination, all.files = TRUE)

Arguments

opal

Opal object.

source

Path to the file in the local file system.

destination

Path of the destination folder in the Opal file system. Folder (and parents) will be created if missing.

all.files

When FALSE, upload only visible files (following Unix-style visibility, that is files whose name does not start with a dot). Default is TRUE.

See Also

Other file functions: opal.file_cp(), opal.file_download(), opal.file_ls(), opal.file_mkdir_tmp(), opal.file_mkdir(), opal.file_mv(), opal.file_read(), opal.file_rm(), opal.file_unzip(), opal.file_write(), opal.file()

Examples

Run this code
if (FALSE) {
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
# upload a file
opal.file_upload(o, 'some_data.csv', '/home/administrator')
# upload a folder
opal.file_upload(o, 'some_data', '/home/administrator')
opal.logout(o)
}

Run the code above in your browser using DataLab