Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java get creation date of file

Path file = ...;
BasicFileAttributes attr = Files.readAttributes(file, BasicFileAttributes.class);

System.out.println("creationTime: " + attr.creationTime());
System.out.println("lastAccessTime: " + attr.lastAccessTime());
System.out.println("lastModifiedTime: " + attr.lastModifiedTime());
Comment

java file creation date

Path file = ...;
BasicFileAttributes attr = Files.readAttributes(file, BasicFileAttributes.class);

System.out.println("creationTime: " + attr.creationTime());
System.out.println("lastAccessTime: " + attr.lastAccessTime());
System.out.println("lastModifiedTime: " + attr.lastModifiedTime());
Comment

PREVIOUS NEXT
Code Example
Java :: . Java Program to Delete the Specified Integer from an Array 
Java :: spring boot api key authentication example 
Java :: android list newline 
Java :: onclick listview javafx 
Java :: split in java 
Java :: java set font 
Java :: resultset next method 
Java :: sort arrays by first element java 
Java :: android alert change color 
Java :: why static variables cannot be serialized in java 
Java :: android snackbar message is behind back button 
Java :: spring logback configuration 
Java :: sort a list in java according to last name 
Java :: java null 
Java :: java number reverse 
Java :: Valid regex check java 
Java :: Java Define a Functional Interface in java 
Java :: Java telegram bot dependency 
Java :: get distinct values from list of objects java 
Java :: resttemplate get rest api call in java 
Java :: remove duplicates from list java 
Java :: for() in java 
Java :: java code for logarithm 
Java :: Java Singleton Class Syntax 
Java :: convert string array to string 
Java :: add string to array java 
Java :: runtime exception in java 
Java :: java spring mvc 
Java :: java check if array element is null 
Java :: int to integer array in java 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =