Determine if File or Directory is hidden - Java File Path IO

Java examples for File Path IO:Directory

Description

Determine if File or Directory is hidden

Demo Code


import java.io.*;
 
public class Main {
 
  public static void main(String[] args) {
     File file = new File("C://Folder//HiddenDemo.txt");
     boolean blnHidden = file.isHidden();
     System.out.println("Is " + file.getPath() + " hidden ?: " + blnHidden);
  }//from  w  w w.  j av  a 2  s. c  o  m
}

Result


Related Tutorials