List of usage examples for java.nio.file Paths get
public static Path get(String first, String... more)
From source file:Main.java
public static void main(String[] args) throws Exception { BasicFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); attr = Files.readAttributes(path, BasicFileAttributes.class); System.out.println("File creation time: " + attr.creationTime()); }
From source file:Main.java
public static void main(String[] args) throws Exception { BasicFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); attr = Files.readAttributes(path, BasicFileAttributes.class); System.out.println("File was last time modified at: " + attr.lastModifiedTime()); }
From source file:Main.java
public static void main(String[] args) throws Exception { BasicFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); attr = Files.readAttributes(path, BasicFileAttributes.class); System.out.println(attr.fileKey()); }
From source file:Main.java
public static void main(String[] args) throws Exception { BasicFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); attr = Files.readAttributes(path, BasicFileAttributes.class); System.out.println("Is directory ? " + attr.isDirectory()); }
From source file:Main.java
public static void main(String[] args) throws Exception { BasicFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); attr = Files.readAttributes(path, BasicFileAttributes.class); System.out.println("File was last time accessed at: " + attr.lastAccessTime()); }
From source file:Main.java
public static void main(String[] args) throws Exception { BasicFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); attr = Files.readAttributes(path, BasicFileAttributes.class); System.out.println("Is symbolic link ? " + attr.isSymbolicLink()); }
From source file:Main.java
public static void main(String[] args) throws Exception { BasicFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); attr = Files.readAttributes(path, BasicFileAttributes.class); System.out.println("Is regular file ? " + attr.isRegularFile()); }
From source file:Main.java
public static void main(String[] args) { DosFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); try {//from w ww. j a v a 2s .c o m attr = Files.readAttributes(path, DosFileAttributes.class); } catch (IOException e) { System.err.println(e); } System.out.println("Is read only ? " + attr.isReadOnly()); }
From source file:Main.java
public static void main(String[] args) { DosFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); try {/* w w w.j a va 2s .c o m*/ attr = Files.readAttributes(path, DosFileAttributes.class); } catch (IOException e) { System.err.println(e); } System.out.println("Is archive ? " + attr.isArchive()); }
From source file:Main.java
public static void main(String[] args) { DosFileAttributes attr = null; Path path = Paths.get("C:/tutorial/Java/JavaFX", "Topic.txt"); try {// ww w .j a v a 2 s . c o m attr = Files.readAttributes(path, DosFileAttributes.class); } catch (IOException e) { System.err.println(e); } System.out.println("Is system ? " + attr.isSystem()); }