2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

How to check a file is hidden or not?

i want to check a file is hidden or not using java. How to do?

userimage

Try like below:

File file = new File(<Location of file>);

file.isHidden();


Cheers!!!

userimage

The isHidden() method is system dependent.

on UNIX/LINUX, a file is considered hidden if it’s name is begins with a “dot” symbol (‘.’) like ".m2" repository folder.

 On Microsoft Windows, a file is considered to be hidden, if it’s marked as hidden in the file properties.

Answer is