IFolderAsyncCreateFolderAsync Method
IT Hit WebDAV Classes Reference
Creates new WebDAV folder with the specified name in this folder.
Namespace:
ITHit.WebDAV.Server.Class1
Assembly:
ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 11.3.10719
Syntax Task CreateFolderAsync(
string name
)
Task CreateFolderAsync(
string name
)
Function CreateFolderAsync (
name As String
) As Task
Function CreateFolderAsync (
name As String
) As Task
Task^ CreateFolderAsync(
String^ name
)
Task^ CreateFolderAsync(
String^ name
)
abstract CreateFolderAsync :
name : string -> Task
abstract CreateFolderAsync :
name : string -> Task
Parameters
- name
- Type: SystemString
Name of the folder to create.
Return Value
Type:
Task
.
Exceptions Examples The code below is part of 'WebDAVServer.FileSystemStorage.AspNet' C# & VB samples provided with the SDK.
virtual public async Task CreateFolderAsync(string name)
{
await RequireHasTokenAsync();
bool isRoot = dirInfo.Parent == null;
DirectoryInfo di = isRoot ? new DirectoryInfo(@"\\?\" + context.RepositoryPath.TrimEnd(System.IO.Path.DirectorySeparatorChar)) : dirInfo;
di.CreateSubdirectory(name);
await context.socketService.NotifyCreatedAsync(System.IO.Path.Combine(Path, name));
}
Overridable Public Async Function CreateFolderAsync(name As String) As Task Implements IFolderAsync.CreateFolderAsync
Await RequireHasTokenAsync()
Dim isRoot As Boolean = dirInfo.Parent Is Nothing
Dim di As DirectoryInfo = If(isRoot, New DirectoryInfo("\\?\" & context.RepositoryPath.TrimEnd(System.IO.Path.DirectorySeparatorChar)), dirInfo)
di.CreateSubdirectory(name)
Await context.socketService.NotifyCreatedAsync(System.IO.Path.Combine(Path, name))
End Function
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.
See Also