The Java Developers Almanac 1.4


Order this book from Amazon.

   
Home > List of Packages > javax.swing.filechooser  [19 examples] > Hidden Files  [2 examples]

e897. Determining If a File Is Hidden

    JFileChooser chooser = new JFileChooser();
    
    // Create a File instance of the file
    File file = new File("c:\\Program Files");
    // (this file is not hidden)
    
    file = new File("c:\\IO.SYS");
    // (this file is hidden)
    
    // Check if file is hidden
    boolean isHidden = chooser.getFileSystemView().isHiddenFile(file);

 Related Examples
e896. Showing Hidden Files in a JFileChooser Dialog

See also: Events    Icons    Layout    Selections   


© 2002 Addison-Wesley.