ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2024 feature!
Help / WLanguage / WLanguage functions / Communication / Drive functions
  • parameter
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Lists drive directories.
Example
oOAuth2Param is OAuth2Parameters
oOAuth2Param.ClientID = "client_id"
oOAuth2Param.ClientSecret = "client_secret"
oOAuth2Param.RedirectionURL = "http://localhost:9000/"

ResSend is boolean
oMyDrive is Drive
oMyDrive = oDriveConnect(oOAuth2Param)

ADirectory, ResListDirectory are strings
// Lists all the directories in my drive from the "MyPhotos" directory.
// Only the current directory is examined
ResListDirectory = DriveListDirectory(oMyDrive, "/MyPhotos/", frNotRecursive)

// Add each found directory to a Table control
FOR EACH STRING ADirectory OF ResListDirectory SEPARATED BY CR
// Add the directory to TABLE_TableDirectory
TableAdd(TABLE_TableDirectory, ADirectory)
END
Syntax
<Result> = DriveListDirectory(<Drive> , <Start directory> [, <Options>])
<Result>: Character string
List of directories on the specified drive, at the specified location. This list has the following format:
<Name of directory 1>+ CR + ... + <Name of directory N>
<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, directories will not be listed.
<Start directory>: Character string
Path of the directory from which directories are to be listed. This must be an absolute path:
  • Directory names must be separated by '/' or '\'.
  • Directory names must start with '/' or '\'.
If the path is invalid, an error will be generated.
<Options>: Optional Integer constant
Type of iteration:
frNotRecursiveThe iteration is non-recursive. Subdirectories are ignored.
frRecursive
(Default value)
The iteration is recursive. Subdirectories are automatically taken into account.
Remarks

<Start directory> parameter

Examples of valid paths:
"/holidays directory/2021/"
"\photos"
Examples of invalid paths:
"directoryA/DirectoryB"
"This/Path/Is/invalid"
"c:\Users\"
Related Examples:
Drive functions Unit examples (WINDEV): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
Drive functions Unit examples (WINDEV Mobile): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
Business / UI classification: Business Logic
Component: wd290ggl.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/04/2024

Send a report | Local help