Java Path File Write nio isWritePermission(Path p)

Here you can find the source of isWritePermission(Path p)

Description

is Write Permission

License

Open Source License

Declaration

public static boolean isWritePermission(Path p) 

Method Source Code


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

Related

  1. canWrite(Path path)
  2. checkFilePermissions(final String filepath, final boolean canRead, final boolean canWrite)
  3. compareTable(final String table, final List d1, final List d2, final BufferedWriter errors)
  4. newBufferedWriter(Path path)
  5. newBufferedWriter(Path path, OpenOption... options)
  6. newGzipBufferedWriter(Path path)
  7. okayToOverwrite(Path file)