Finding Date and Time of File or Folder Created
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   merugu_naveen
Posted On:   Monday, October 21, 2002 03:22 AM

Hi
I have Problem Please Help me in solving this

How can i find the File/Folder creation date and time in java? also if i modify the file/folder i want to see when actually the file/folder was created and when it was modified.Is there any solution for this problem in java

Regards
Naveen

Re: Finding Date and Time of File or Folder Created

Posted By:   Jeanne_Boyarsky  
Posted On:   Monday, October 21, 2002 05:31 PM

I'd like to add that Java's File class can be used for files and folders/directories. I don't think you can get the creation time short of a system call.

Re: Finding Date and Time of File or Folder Created

Posted By:   Patrick_Holzmann  
Posted On:   Monday, October 21, 2002 05:45 AM

hi,
there is a way to get the last modified attribute of a file by calling the method "long a = file.lastModified ();"..
this returns a long value which you can then convert to a Date object ( Date d = new Date (a); )


cheers
About | Sitemap | Contact