|
|
|
|
- parameter
- Creating subdirectories
DriveCreateDirectory (Function) In french: DriveCréeRépertoire
Not available
Creates a directory on a remote drive.
oOAuth2Param is OAuth2Parameters
oOAuth2Param.ClientID = "client_id"
oOAuth2Param.ClientSecret = "client_secret"
oOAuth2Param.RedirectionURL = "http://localhost:9000/"
oDrive is Drive
oDrive = oDriveConnect(oOAuth2Param)
IF DriveCreateDirectory(oDrive, "/MyDirectories/NonexistentDirectory/MySubdirectory/") = False THEN
Error("Unable to create directory", ErrorInfo())
RETURN
END
Syntax
<Result> = DriveCreateDirectory(<Drive> , <Directory to create>)
<Result>: Boolean - True if the directory was created,
- 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 element is not created. <Directory to create>: Character string Absolute path of the directory to be created. If this parameter does not correspond to a valid path, the element will not be created. Missing directories in the path will automatically be created. In Dropbox, the directory to be created must not end with the "/" character. Remarks <Directory to create> parameter Examples of valid paths: "/holidays directory/2021/" "\photos" Examples of invalid paths: "directoryA/DirectoryB" "This/Path/Is/invalid" "c:\Users\" Creating subdirectories You can create a directory and the missing subdirectories. For example:
IF DriveCreateDirectory(MyDrive, "/MyDirectories/Directory1/") = False THEN
Error("Unable to create directory", ErrorInfo())
RETURN
END
Caution: In Dropbox, the directory to be created must not end with the "/" character. The code becomes:
IF DriveCreateDirectory(MyDrive, "/MyDirectories/Directory1") = False THEN
Error("Unable to create directory", ErrorInfo())
RETURN
END
Related Examples:
|
Unit examples (WINDEV): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
|
|
Unit examples (WINDEV Mobile): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
|
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|