Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you can use the metadata of a
Fileobject to get anything you need. Check the following link:http://docs.oracle.com/javase/tutorial/essential/io/fileAttr.html
Example:
(This example was taken from the link I provided).
Hope this helps you
Checking the Java API, I find out that the data you need (size, attributes, etc.) are accesible through the
Fileclass methods. Check: http://docs.oracle.com/javase/7/docs/api/java/io/File.htmlNotice that linux and mac are both Unix-like systems, and windows is not. Therefore, you won’t be able to get all the file attributes you can expect to get on linux or mac in windows… but you can get the most important values