#g4gdrv_downloadFile
*//////////////////////////////////////////////////////////////*
* #g4gdrv_downloadFile - Download File *
* *
* Output: *
* out_errMsg - The error message (if error exists). *
* *
* Returns: *
* -1 for error, 0 for success *
* *
* Settable Variables ([r]=required) *
* id - Google ID [r] *
* file_id - The Google File ID of the file to download *
* download_folder - The name of the folder to download a *
* file from. If file_id is specified this value is *
* ignored. *
* download_file - The name of the file to download. If *
* file_id is specified this value is ignored. *
* convert_file - Specify *YES to convert the file when *
* downloaded. *
* mime_type - If converting the file while downloading, *
* specify the mime type of the resulting file. *
* download_to_directory - The directory to place the *
* downloaded file into. [r] *
* download_to_filename - The name of the file to download *
* the file to. [r] (*DFT) *
* replace_file - Whether or not to replace the file if it *
* already exists (*YES, *NO) *
* ccsid - The CCSID to use (1252) *
* debug - Turn on Debug (*NO, *YES) *
* debug_file - The debug file name. *
* (/tmp/g4g_[id]_moveFile.txt) *
* *
*//////////////////////////////////////////////////////////////*
D #g4gdrv_downloadFile...
D PR 10i 0
D out_errMsg 256 Options(*NOPASS)
#g4gdrv_downloadFile will download a file from your Google Drive Account.
Returns: 1 for successful upload, -1 for error.
Optional Parameters:
- Error Message (output) - Error message
Settable Variables (use #g4gdrv_setValue):
- id (required) - Your Google ID
- file_id - The Google File ID of the file you wish to download
- download_folder - The name of the folder to download a file from. If file_id is specified this field is ignored.
- download_file - The name of the file to download. If file_id is specified this field is ignored.
- convert_file - Specify *YES if you wish to convert the file when downloaded. This option is only available for files already in a Google Doc format.
- mime_type - If you are converting the file during the download, specify the mime type for the downloaded and converted file.
- download_to_directory - The IFS Directory you wish to download the file to. Example: /myfiles/downloads
- download_to_filename - The name of the file after it is downloaded. The value of *DFT can be used when specifying a download folder and download file. In this case the filename will be the same as the downloaded file name.
- replace_file - Specify *YES (default) to replace a file if it exists when downloading it or *NO to stop and throw an error if the file already exists in the IFS.
- ccsid - The CCSID to use. The default is 1252.
- debug - Specify *YES to turn on debug, or *NO to turn off debug. The default is *NO.
- debug_file - Specify the fully qualified file name for the main debug file. The default is /tmp/g4g_[id]_downloadFile.txt