Getting the modification date and time of file or folder in Java

Ads
 

Getting the modification date and time of file or folder in Java

In this section, you will learn how to get the last modification date and time of any file or a folder.

In this section, you will learn how to get the last modification date and time of any file or a folder.
C:\nisha>java GetDirectoryAndFileModifiedTime
Enter file or directory name in proper format to get the modification date and time :
myfile.txt
File name : myfile.txt
File modification date and time : Thu Oct 04 16:31:39 GMT+05:30 2007

C:\nisha>

Download this example.

Ads

Ads