DriveClientCreateFolderAsync Method
Asynchronously 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 Task<File> CreateFolderAsync(
string dstName,
params string[] parentFolderIds
)
Public Function CreateFolderAsync (
dstName As String,
ParamArray parentFolderIds As String()
) As Task(Of File)
Dim instance As DriveClient
Dim dstName As String
Dim parentFolderIds As String()
Dim returnValue As Task(Of File)
returnValue = instance.CreateFolderAsync(dstName,
parentFolderIds)
public:
Task<File^>^ CreateFolderAsync(
String^ dstName,
... array<String^>^ parentFolderIds
)
member CreateFolderAsync :
dstName : string *
parentFolderIds : string[] -> Task<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).
TaskFile
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 = Await client.AuthorizeAsync()
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 = Await client.CreateFolderAsync("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.