Check if a file is system file in C#

bool isSystem = ((File.GetAttributes(filePath) & FileAttributes.System) == FileAttributes.System);

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.