Here you can find the source of isHidden(Path path)
public static boolean isHidden(Path path)
//package com.java2s; //License from project: Apache License import java.nio.file.*; public class Main { public static boolean isHidden(Path path) { try {//from w ww . j av a 2 s . co m return Files.exists(path) && (Files.isHidden(path) || path.getFileName().toString().startsWith(".")); } catch (Exception e) { // logger.error("Problem occured while detecting hidden path {}", path, e); } return false; } }