IO-입 출력 흐름(파일 작업)

1154 단어 자바File
자바 파일 에 대한 작업(자바 파일 속성 에 대한 작업)
public class GetFileInfos {
 
	public static void main(String[] args) {
	   File file = new File("D:/ARM.XML");
	   //File file1 = new File("d://","ARM.XML");
       println("       "  +file.exists());
	   println("    :"+file.getName()); 
       println("    :"+file.length() + "  ");
       println("      :"+file.getAbsolutePath());
       println("      :"+file.getParent());
       println("      :"+file.canRead());
       println("      :"+file.canWrite());
       println("      :"+file.isHidden());
       println("      :"+file.isFile());
       println("       :"+file.isDirectory());
       println("     URI:"+file.toURI());
       println("         :"+new Date(file.lastModified()));
	}
	
	protected static void println(String s){
	   System.out.println(s);	
		
	}

   }

일반적인 파일 속성 작업,이상 의 방법 은 충분 할 것 입 니 다.특수 항목 특별 취급

좋은 웹페이지 즐겨찾기