如何使用C#在Azure Data Lake store中复制文件

我正在尝试将文件从一个文件夹复制/移动到azure数据湖中的另一个文件夹。 业务需要创建动态文件夹并移动/复制文件。 如何使用c#做到这一点?

使用以下代码从Azure Data Lake Store文件夹中移动/重命名文件。

如果要重命名文件,请将dest_path保持为相同。

如果要跨文件夹移动文件,请提供以“/”开头的目标文件夹路径

DataLakeStoreFileSystemManagementClient _adlsFileSystemClient = new DataLakeStoreFileSystemManagementClient(); public static void Move(string src_path, string dest_path) { _adlsFileSystemClient.FileSystem.Rename(_adlsAccountName, src_path, dest_path); } 

重命名文件的调用方法:

移动(_sourcePath + filename,_destinationPath + Path.GetFileNameWithoutExtension(filename)+“。tsv”);

移动文件的调用方法:

移动(_sourcePath + filename,_destinationPath + filename);