我想在系统卷信息子文件夹中打开内存映射文件.我知道并在资源管理器中看到它存在,并且路径是正确的(它是从资源管理器复制粘贴的),而且该路径的File.Exists返回true,但MemoryMappedFile.OpenExisting失败并带有DirectoryNotFoundException.为什么?(我拥有系统卷信息文件夹和子文件夹的所有权限).
一些代码:
const string filePath = @"C:\\System Volume Information\\Foo\\2.ext";
bool exists = File.Exists(filePath); //is true
using (MemoryMappedFile bitmapFile = MemoryMappedFile.OpenExisting(filePath, MemoryMappedFileRights.Read)) //Throws DirectoryNotFoundException
{
...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
430 次 |
| 最近记录: |