Download a File
DESCRIPTION:
Download a file to local folder from a remote server. If file already exists in the folder, the file is overwritten.
USAGE:
webDav.downloadFile(serverUrl, userName, password = NA, remoteLocation, localLocation)
ARGUMENTS:
- serverUrl
-
A character string identifying the server's address (for example: "http://myserver:8080").
- userName
-
A character string containing the identifier (the login name) of user (for example: "johndoe").
- password
-
A character string used to log into the Spotfire S+ server (for example: "myPassword").
- remoteLocation
-
The URL full path (including the name of the file) to the file on the server. For example,
http://myserver:8080/SPServer/webdav/testfile.jpg.
- localLocation
-
Full path (including the file name) to the destination on the client. For example,
C:\myfiles\testfile.jpg.
DETAILS:
The password is not encrypted when it is sent from the client to the server. You can
omit the password parameter if server does not require one.
VALUE:
returns a
TRUE
if download was successful; otherwise
FALSE
.
For example, this function will return
FALSE
if the requested file was not found.
SEE ALSO:
,
EXAMPLES:
## Not run:
## userName <- "johndoe"
## password <- "mypassword"
## serverUrl <- "http://myserver:8080"
## webdavRoot = paste(serverUrl, "/SPServer/webdav", sep = "")
## resultsFolder <- paste(webdavRoot, "/results", sep = "")
##
## webDav.downloadFile(serverUrl, userName, password, paste(webdavRoot, "/testfile.jpg", sep=""), "c:/myfiles/downloadTest.jpg")
## End(Not run)