使用StartCopyAsync C#Azure文件共享时如何保持上次修改日期

时间:2019-07-03 18:36:04

标签: c# azure-storage azure-files

我正在尝试将文件从文件共享中的一个位置复制到另一位置。我正在获取属性,然后使用startcopyasync。元数据仍然存在,但最后修改的日期和etag更改。

StartCopy表示它复制元数据和属性,但似乎只复制元数据给我。

var currentFile = srcDir.GetFileReference(((CloudFile) item).Name);
currentFile.FetchAttributes();
var destFile = destDir.GetFileReference(((CloudFile) item).Name);                       
await destFile.StartCopyAsync(currentFile);

它实际上不复制上次修改日期吗? 难道我做错了什么?在这种情况下,我找不到很好的文档。

1 个答案:

答案 0 :(得分:0)

请参阅以下链接中提到的建议 Storing file created date in Azure File Storage

Getting the latest file modified from Azure Blob

请告知我们以上内容是否对您有帮助,或者您在此问题上需要进一步的帮助。

相关问题