Files.move {SciServer} | R Documentation |
Moves or copies a file or folder within remote FileService(s)
Jobs.move(fileService, path, destinationFileService, destinationPath, replaceExisting=TRUE, doCopy=TRUE)
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. Example: rootVolume/userVolumeOwner/userVolume/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. Example: rootVolume/userVolumeOwner/userVolume/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. |
void
Manuchehr Taghizadeh-Popp
Maintainer: Manuchehr Taghizadeh-Popp <mtaghiza@jhu.edu>
http://www.sciserver.org
http://apps.sciserver.org
http://apps.sciserver.org/dashboard/files
http://www.github.com/sciserver/SciScript-R
Files.getFileServices
, Files.getFileServiceFromName
,
Files.delete
, Files.createDir
,
Files.upload
, Files.download
, Files.createUserVolume
fileServices = Files.getFileServices(); Files.move(fileService[[1]],"rootVolume/userVolumeOwner/userVolume/fileToBeMoved.txt",fileService[[1]],"rootVolume2/userVolumeOwner/userVolume2/fileToBeCopied.txt")