Files.upload {SciServer}R Documentation

Upload file or data

Description

Uploads data or a local file into a path defined in the file system.

Usage

Jobs.upload(fileService, path, data=NULL, localFilePath=NULL, quiet=TRUE)

Arguments

fileService

name of fileService (string), or object (list) that defines a file service. A list of these kind of objects available to the user is returned by the function Files.getFileServices().

path

path (in the remote file service) to the destination file (string), starting from the root volume level. Example: rootVolume/userVolumeOwner/userVolume/destinationFile.txt

data

string containing data to be uploaded, in case localFilePath is not set.

localFilePath

path to a local file to be uploaded (string)

quiet

If set to FALSE, it will throw an error if the file already exists. If set to TRUE. it will not throw an error.

Value

void

Author(s)

Manuchehr Taghizadeh-Popp
Maintainer: Manuchehr Taghizadeh-Popp <mtaghiza@jhu.edu>

References

http://www.sciserver.org
http://apps.sciserver.org
http://apps.sciserver.org/dashboard/files
http://www.github.com/sciserver/SciScript-R

See Also

Files.getFileServices, Files.getFileServiceFromName, Files.delete, Files.createDir, Files.download, Files.dirList, Files.createUserVolume

Examples

fileServices = Files.getFileServices(); Files.upload(fileServices[0], "myRootVolume/myUserVolume/persistent/myUploadedFile.txt", data="#ID,Column1,Column2\n1,4.5,5.5")

[Package SciServer version 2.0.0 Index]