Mat*_*att 3 .net c# encrypting-file-system ntfs
是否有某个库方法用于确定文件是否已使用EFS加密?我在FileInfo上看到了Encrypt()和Decrypt()方法,但我正在寻找一种查询文件状态的方法.
扩展bdolan&matt的评论:
<snip>
using System.IO;
<snip>
FileInfo fi = new FileInfo(uri); //uri is the full path and file name
if (fi.Attributes.HasFlag(FileAttributes.Encrypted))
{
//FILE IS ENCRYPTED
}
else
{
//FILE IS SAFE
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3102 次 |
| 最近记录: |