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 ip 
Java :: servlet redirect java 
Java :: java check ipv6 with regex 
Java :: java create txt file 
Java :: java add text to GUI 
Java :: read int from keyboard java 
Java :: how to check if location is enabled android 
Java :: l,og in android studio 
Java :: how to get the time in java 
Java :: Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules jetified-guava-24.1-jre (com.google.guava:guava:24.1-jre) and jetified-listenablefuture-1.0 (com.google.guava:listenablefuture:1.0) 
Java :: bubble sort java 
Java :: array slice java 
Java :: Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt 
Java :: making matrix in java 
Java :: java how to generate guid 
Java :: calculate pi in java 
Java :: JLabel not centering 
Java :: java string format .2f 
Java :: java product 1 to n 
Java :: Unable to locate a Java Runtime that supports apt. 
Java :: int to string java 
Java :: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 
Java :: how to show full search bar in android studio 
Java :: java key pressed 
Java :: string to localdate in java 
Java :: java transform hashmap to list 
Java :: java execute funtions at same time 
Java :: java actionlistener 
Java :: error: package androidx.multidex does not exist 
Java :: infinity constatn in java 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =