DriveClientCreateFolder Method
Creates a new folder in the Google Drive of the user account.
Namespace: DevCase.ThirdParty.Google.DriveAssembly: DevCase.net48.ThirdParty.GoogleServices (in DevCase.net48.ThirdParty.GoogleServices.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public File CreateFolder(
string dstName,
params string[] parentFolderIds
)
Public Function CreateFolder (
dstName As String,
ParamArray parentFolderIds As String()
) As File
Dim instance As DriveClient
Dim dstName As String
Dim parentFolderIds As String()
Dim returnValue As File
returnValue = instance.CreateFolder(dstName,
parentFolderIds)
public:
File^ CreateFolder(
String^ dstName,
... array<String^>^ parentFolderIds
)
member CreateFolder :
dstName : string *
parentFolderIds : string[] -> File
No code example is currently available or this language may not be supported.
- dstName String
-
The name of the folder being created.
- parentFolderIds String
-
The identifier of the parent folder(s) where to create the new folder.
This paramenter can be empty (nul).
File
The resulting
File.
This is a code example.
No code example is currently available or this language may not be supported.
Dim client As New DriveClient("C:\GoogleSecrets.json", "yourmail@gmail.com", DriveScopes.Full)
Dim credential As UserCredential = client.Authorize()
Dim dstParentFolder As Global.Google.Apis.Drive.v3.Data.File = client.GetFoldersByName("Parent Folder Name").Single()
Dim createdFolder As Global.Google.Apis.Drive.v3.Data.File = client.CreateFolder("Folder Name", dstParentFolder.Id)
Dim sb As New Global.System.Text.StringBuilder()
With sb
.AppendLine(String.Format("Id: {0}", createdFolder.Id))
.AppendLine(String.Format("Name: {0}", createdFolder.Name))
.AppendLine(String.Format("Date Created: {0}", createdFolder.CreatedTime?.ToString()))
.AppendLine(String.Format("Url: {0}", If(createdFolder.WebContentLink, createdFolder.WebViewLink)))
.AppendLine(String.Format("Parent Folder Ids: {0}", String.Join(",", If(createdFolder.Parents, {"nul"}))))
End With
Console.WriteLine(sb.ToString())
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.