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 & HelpPrograms › Reading file info
Page Index Toggle Pages: 1
Reading file info (Read 318 times)
Reading file info
Dec 22nd, 2008, 6:28pm
 
Hi,

I'm trying to make a program that reads info from a file on the hard drive.

For example in windows you can get file info from a file, like the size, the owner, the date the file was created, etc

I already have the code to get the name of the file but I'm stuck on the other parts.

Is there a method to get file information?

Regards Maarten.
Re: Reading file info
Reply #1 - Dec 23rd, 2008, 4:20pm
 
The File class offers already a number of features.
Other things, like owner or attributes, are system dependent.

...
After a quick googling, I found Getting the file owner in Java using JNI, which confirms one much call system functions to get this information.
I found that a nio class might get this information... in Java 7!
Page Index Toggle Pages: 1