Java示例隐藏目录


Java示例隐藏目录

import java.io.File;

import java.io.IOException;



public class FileHidden {

   public static void main(String[] args) throws IOException {

      File file = new File("C:\\Users\\codingdict7\\Desktop\\abc.txt");

      if(file.isHidden()) {

         System.out.println("This file is hidden");

      } else {

         System.out.println("This file is not hidden");

      }

   }

}