Is there any library method to find out if a file has been encrypted with EFS? I can see the methods Encrypt()and Decrypt()in the FileInfo, but I'm looking for a way to request the status of the file.
Encrypt()
Decrypt()
Use GetFileAttributes()and check FILE_ATTRIBUTE_ENCRYPTED.
GetFileAttributes()
FILE_ATTRIBUTE_ENCRYPTED
To expand on bdolan and matte comment:
<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 }
Source: https://habr.com/ru/post/1720851/More articles:Individual business rules for each client ... (asp.net mvc) - c #Error IE8 CSS / combobox (weird display text) - cssWPF animation in ListBox - c #Clutter in mixed assemblies C ++ / CLI - c ++ - cliIs it right to say that "Java is platform independent, but version dependent?" - javaProgram reload automatically when an error occurs - pythonCakePHP Pagination Sort data from a model - sortingCoreData countForFetchRequest says "object not found" - objective-ccross-browser expandable round corner with semantic code and minimal use of images. Is it possible? - cssHow do you std :: vector in Xcode + C ++? - c ++All Articles