package ch10_01;
import java.io.File;
public class GetFileInfo {
	  public static void main(String[] args) {
		String pathname="d:/java/abc.txt";
		File f1=new File(pathname);
		
                System.out.println("文件是否存在："+f1.exists());
		System.out.println("文件名称："+f1.getName());
		System.out.println("文件的相对路径："+f1.getPath());
		System.out.println("文件的绝对路径："+f1.getAbsolutePath());
		System.out.println("文件可读："+f1.canRead());
		System.out.println("文件可写："+f1.canWrite());
		System.out.println("文件大小："+f1.length());
	  }
}
