Is there a library method somewhere for figuring out whether a file has been encrypted with EFS? I see the Encrypt()
and Decrypt()
methods on FileInfo, but am looking for a way to query a file's state.
Use GetFileAttributes()
, and check for FILE_ATTRIBUTE_ENCRYPTED
.