确定文件或目录是否隐藏
import java.io.*; /** 来自 n o w j a v a . c o m**/ 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); } }