g4gdrv_listFiles

*//////////////////////////////////////////////////////////////*

* g4gdrv_listFiles - List Files *

* *

* Output: *

* out_errMsg - The error message (if error exists). *

* *

* Returns: *

* -1 for error, number of files *

* *

* Settable Variables ([r]=required) *

* id - Google ID [r] *

* in_drive_id - The ID of the shared drive to upload to. *

* Leave blank to specify your personal drive. *

* in_drive_name - The name of the shared drive to upload *

* to. If drive id and drive name are specified, the drive *

* name will be ignored. *

* max_results - The maximum number of results to return *

* The default is 1, and the maximum is 1000. *

* in_parent_id - The ID of the parent folder to retrieve *

* items from. Leave this blank to retrieve from all *

* folders. *

* folder_name - The name of the parent folder to retrieve *

* items from. Leave this blank to retrieve from all *

* folders. *

* trashed - To search for files in trash or not. Blank *

* will return transhed and not trashed, "true" will return *

* only trashed, and "false" (default) will return only *

* files that are NOT in the trash. *

* retrieve_folders - Specify "true" to return only folders *

* in the list, "false" (default) to return only files, or *

* blank to return both files and folders *

* ccsid - The CCSID to use (1252) *

* debug - Turn on Debug (*NO, *YES) *

* debug_file - The debug file name. *

* (/tmp/g4g_[id]_listGroupsDebug.txt) *

* *

*//////////////////////////////////////////////////////////////*

D g4gdrv_listFiles...

D PR 10i 0

D out_errMsg 256 Options(*NOPASS)

g4gdrv_listFiles will return a list of files for the Google File ID specified. This list will populate the G4GDRVPF file.

Returns: The number of files returned, or -1 for an error.

Optional Parameters:

  • Error Message (output) - Error message

Settable Variables (use g4gdrv_setValue):

  • id (required) - Your Google ID

  • in_drive_id - If you want to list files in a shared drive, enter the ID of the shared drive here.

  • in_drive_name - If you specify a shared drive name, this will attempt to find the ID of the shared drive.

  • max_results - The maximum number of results to return

  • in_parent_id - The ID of a folder you wish to retrieve items from. Leave this value blank if you wish to retrieve from all folders. Please note that when specifying a folder ID only the items in the folder will be retrieved and it will not recursively parse sub folders and their items.

  • folder_name - The name of a folder you wish to retrieve items from. Leave this value blank if you wish to retrieve from all folders.

  • trashed - Whether or not to search the trash. Blank will search files both in the trash and not in the trash. "true" will search only the trash, and "false" will search only files that are NOT in the trash.

  • retrieve_folders - Whether or not to include folders in the list. Blank will return both files and folders, "true" will return only folders, and "false" will return only files.

  • 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]_listFilesDebug.txt.[n] where [id] is the Google ID and [n] is the request index.