Files.move: Move or copy file or folder

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/Files.r

Description

Moves or copies a file or folder within remote FileService(s)

Usage

1
Jobs.move(fileService, path, destinationFileService, destinationPath, replaceExisting=TRUE, doCopy=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

String defining the origin path (in the remote fileService) of the file or directory to be copied/moved, starting from the root volume level or data volume level. Examples: rootVolume/userVolumeOwner/userVolume/fileToBeMoved.txt or dataVolume/fileToBeMoved.txt

destinationFileService

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

destinationPath

String defining the destination path (in the remote destinationFileService) of the file or directory to be copied/moved, starting from the root volume level or data volume level. Examples: rootVolume/userVolumeOwner/userVolume/recentlyMovedFile.txt or dataVolume/recentlyMovedFile.txt

replaceExisting

If set to FALSE, it will throw an error if the file already exists, If set to TRUE, it will not throw and eeror in that case.

doCopy

if set to TRUE, then it will copy the file or folder. If set to FALSE, then the file or folder will be moved.

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.upload, Files.download, Files.createUserVolume

Examples

1
fileServices = Files.getFileServices(); Files.move(fileService[[1]],"rootVolume/userVolumeOwner/userVolume/fileToBeMoved.txt",fileService[[1]],"rootVolume2/userVolumeOwner/userVolume2/fileToBeCopied.txt")

sciserver/SciScript-R documentation built on May 29, 2019, 3:45 p.m.