Java Files.isExecutable(Path path)

Syntax

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

public static boolean isExecutable(Path path)

Example

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


//w  w w  .  ja  v  a2  s  .c o  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_executable = Files.isExecutable(path);
    }
}




















Home »
  Java Tutorial »
    java.nio.file »




DirectoryStream.Filter
Files
FileStore
FileSystem
FileVisitor
Path
Paths
WatchService