We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Get "Last Modified" from file
Page Index Toggle Pages: 1
Get "Last Modified" from file (Read 559 times)
Get "Last Modified" from file
Jun 19th, 2007, 11:04am
 
Is there some smart and simple p5-way to get the last modified date from a file or do I have to do it the java-way?
Re: Get "Last Modified" from file
Reply #1 - Jun 21st, 2007, 4:48pm
 
just the java way, but if it's in the sketch folder, use:

Code:

String path = sketchPath("filename");
File file = new File(path);
println(file.lastModified());


or if it's in the data folder, you can use dataPath(). otherwise, an absolute path will do the trick.
Re: Get "Last Modified" from file
Reply #2 - Jun 26th, 2007, 7:45pm
 
Perfect, thanks!

Is there somewhere I can find out about all these neat but secret processing functions that are not in the extended reference?
Page Index Toggle Pages: 1