|
|
|
|
<Drive variable>.DownloadFile (Function) In french: <Variable Drive>.RécupèreFichier Downloads a file from a remote drive to the user's computer.
oOAuth2Param is OAuth2Parameters
oOAuth2Param.ClientID = "client_id"
oOAuth2Param.ClientSecret = "client_secret"
oOAuth2Param.RedirectionURL = "http://localhost:9000/"
oDrive is Drive
oDrive = oDriveConnect(oOAuth2Param)
sDirectory is string
sDirectory = fSelectDir(fExeDir(), "Local directory where to download the file")
IF oDrive.DownloadFile("/MyPhotos/2000/0001.jpg", sDirectory) = False THEN
Error("Unable to download file", ErrorInfo())
RETURN
END
Syntax
<Result> = <Drive>.DownloadFile(<File to download> , <Local location>)
<Result>: Boolean - True if the file has been downloaded,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Drive>: Drive or gglDrive variable Name of the Drive or gglDrive variable that corresponds to the drive to be used. The connection to the drive must have been previously established. Otherwise, the file is not downloaded. <File to download>: Character string Absolute path of the file to be downloaded from the remote drive. If this parameter does not correspond to a valid file path, the file will not be downloaded. <Local location>: Character string Absolute path of the file to be saved on the local computer. If this parameter does not correspond to a valid file path, or if a file with the same name already exists, the file will not be downloaded. Remarks Downloaded file The downloaded file is no longer linked to the remote drive. No changes made to the file on the remote drive will be reflected on the downloaded file (and vice versa). Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|