Azure Datalake存储使用C创建一个空文件#

Azure Datalake存储使用C创建一个空文件#,azure,azure-data-lake,Azure,Azure Data Lake,如何使用C#在Azure Data lake上创建空文件。在其中一个线程中,提到要使用-FileSystemOperationsExtensions.Create,但如何使用它来创建空文件。下面是一个代码段示例,可以实现这一点: // to find out how to get the credentials... // see: https://github.com/Azure-Samples/data-lake-analytics-dotnet-auth-options var adlC

如何使用C#在Azure Data lake上创建空文件。在其中一个线程中,提到要使用-FileSystemOperationsExtensions.Create,但如何使用它来创建空文件。

下面是一个代码段示例,可以实现这一点:

// to find out how to get the credentials...
// see: https://github.com/Azure-Samples/data-lake-analytics-dotnet-auth-options

var adlCreds = ...;
string adls = "youradlsaccountname";   

var adlsFileSystemClient = new DataLakeStoreFileSystemManagementClient(adlCreds);

var adlsaccount = adlsAccountClient.Account.Get(rg, adls);
adlsFileSystemClient.FileSystem.Create( adls, "/emptyfile.dat", null, null, null,null,null);