It is possible to know the metadata of a file in java? and if it is, How to get the metadata of a file in java?
I think is easy to use this folowing project to get informations from any files.
import java.io.File;
public class FileInfo{
public static void main (String []args){
File f = new File("file100.txt");
if(f.exists()){
System.out.println("Name: "+ f.getName());
System.out.println("Path: "+ f.getAbsolutePath());
System.out.println("Size: "+ f.length());
System.out.println("Writeable: "+ f.canWrite());
System.out.println("Readable: "+ f.canRead());
}else{
System.out.println("The File does not exist");
}
}
}