Java IO Tutorial - Java Files.isReadable(Path path)


Files.isReadable(Path path) has the following syntax.

public static boolean isReadable(Path path)


In the following code shows how to use Files.isReadable(Path path) method.

//w w  w . j  a  va  2s  . co  m

import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.Path;

public class Main {

    public static void main(String[] args) {

        Path path = FileSystems.getDefault().getPath("C:/tutorial/Java/JavaFX", "Demo.txt");

        boolean is_readable = Files.isReadable(path);