package chapter08
import java.io.*;
public class GetFileInfo {
	public static void main(String[] args) throws IOException{
		// һsource.javaļ
		File parentDir=new File("C:/JavaCode");
		File file=new File(parentDir,"source.java");
        // õWindowsϵͳµľ·Ŀ¼ָΪб
		System.out.println(""+file.getAbsolutePath());
        // õUNIXϵͳµľ·Ŀ¼ָΪб
		System.out.println(""+file.getCanonicalPath());
		System.out.println(""+file.getFreeSpace());
		System.out.println(""+file.getName());
      	System.out.println(""+file.getParent());
		System.out.println(""+file.getPath());
		System.out.println(file.getTotalSpace());
		System.out.println(file.getUsableSpace());
		System.out.println(file.getAbsoluteFile());
		System.out.println(file.getCanonicalFile());
		System.out.println(file.getClass());
		System.out.println(file.getParentFile()); 
		System.out.println(file.hashCode());
		System.out.println(file.isFile());
		System.out.println(file.isHidden());
		System.out.println(file.isAbsolute());
		System.out.println(file.length());
		System.out.println(file.lastModified());
		System.out.println(file.canWrite());
		System.out.println(file.canRead());
		System.out.println(file.canExecute());
	}
}
