Java Path File Check nio isHidden(Path path)

Here you can find the source of isHidden(Path path)

Description

is Hidden

License

Apache License

Declaration

public static boolean isHidden(Path path) 

Method Source Code

//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;
    }
}

Related

  1. isFileHidden(Path file)
  2. isFileSymLink(File path)
  3. isFileWritable(final Path file)
  4. isFolder(Path path)
  5. isHidden(final Path path)
  6. isHidden(Path path)
  7. isHidden(Path value)
  8. isJniNativeFunction(Path path)
  9. isJSON(final Path file)