你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

DataLakeFileSystemClient.CreateDirectory 方法

定义

CreateDirectory(String, DataLakePathCreateOptions, CancellationToken) 操作将在此文件系统中创建一个目录。 如果该目录已存在,则将被覆盖。 如果不打算覆盖现有目录,请考虑使用 CreateIfNotExists(DataLakePathCreateOptions, CancellationToken) API。

有关详细信息,请参阅 https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create

public virtual Azure.Response<Azure.Storage.Files.DataLake.DataLakeDirectoryClient> CreateDirectory (string path, Azure.Storage.Files.DataLake.Models.DataLakePathCreateOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateDirectory : string * Azure.Storage.Files.DataLake.Models.DataLakePathCreateOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.DataLakeDirectoryClient>
override this.CreateDirectory : string * Azure.Storage.Files.DataLake.Models.DataLakePathCreateOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.DataLakeDirectoryClient>
Public Overridable Function CreateDirectory (path As String, Optional options As DataLakePathCreateOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of DataLakeDirectoryClient)

参数

path
String

要创建的目录的路径。

options
DataLakePathCreateOptions

可选参数。

cancellationToken
CancellationToken

可选 CancellationToken ,用于传播应取消操作的通知。

返回

描述 Response<T> 新创建的目录的 。

注解

RequestFailedException如果发生故障,将引发 。

适用于