Check whether a file is hidden in C#

bool isHidden = ((File.GetAttributes(filePath) & FileAttributes.Hidden) == FileAttributes.Hidden);

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.