labkey.webdav.downloadFolder {Rlabkey} | R Documentation |
Recursively download a folder via WebDAV
Description
This will recursively download a folder from a LabKey Server using WebDAV.
Usage
labkey.webdav.downloadFolder(
localBaseDir,
baseUrl=NULL,
folderPath,
remoteFilePath,
overwriteFiles=TRUE,
mergeFolders=TRUE,
fileSet='@files'
)
Arguments
localBaseDir |
the local filepath where this directory will be saved. a subfolder with the remote directory name will be created. |
baseUrl |
a string specifying the |
folderPath |
a string specifying the |
remoteFilePath |
the path of this folder on the remote server, relative to the folder root. |
overwriteFiles |
(optional) if true, any pre-existing file at this location will be overwritten. Defaults to TRUE |
mergeFolders |
(optional) if false, any pre-existing local folders in the target location will be deleted if there is an incoming folder of the same name. If true, these existing folders will be left alone, and remote files downloaded into them. Existing file conflicts will be handled based on the overwriteFiles parameter. Defaults to TRUE |
fileSet |
(optional) the name of file server fileSet, which is typically "@files" (the default value for this argument). In some cases this might be "@pipeline" or "@fileset". |
Details
This will recursively download a folder from a LabKey Server using WebDAV. This is essentially a wrapper that recursively calls labkey.webdav.get to download all files in the remote folder.
Value
TRUE or FALSE, depending on if this folder was successfully downloaded
Author(s)
Ben Bimber, Ph.D.
See Also
labkey.webdav.get
,
labkey.webdav.put
,
labkey.webdav.mkDir
,
labkey.webdav.mkDirs
,
labkey.webdav.pathExists
,
labkey.webdav.listDir
,
labkey.webdav.delete
Examples
## Not run:
## download folder from a LabKey Server
library(Rlabkey)
labkey.webdav.downloadFolder(baseUrl="http://labkey/",
folderPath="home",
remoteFilePath="folder1",
localBaseDir="destFolder",
overwrite=TRUE
)
## End(Not run)