Files.move {SciServer}R Documentation

Move or copy file or folder

Description

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

Usage

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. 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.

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

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

[Package SciServer version 2.0.0 Index]