Here you can find the source of isWritePermission(Path p)
public static boolean isWritePermission(Path p)
//package com.java2s; import java.nio.file.Files; import java.nio.file.Path; import java.util.Objects; import java.util.function.Function; public class Main { public static boolean isWritePermission(Path p) { return isPermission(p, Files::isWritable); }/*ww w. jav a2 s . c o m*/ private static boolean isPermission(Path p, Function<Path, Boolean> function) { Objects.requireNonNull(p); Objects.requireNonNull(function); return function.apply(p); } }