import java.io.*;
import java.util.*;
class FileInfo{
public static void main(String[] args)throws IOException{
File file = new File(args[0]);
System.out.println(args[0]+\" 파일의 상세정보 \");
System.out.println(\"절대경로 : \"+file.getAbsolutePath());
try{
System.out.println(\"표준경로 : \"+file.getCanonicalPath());
}catch(IOException e){
e.printStackTrace();
}
System.out.println(\"생성일 : \"+ new Date(file.lastModified()));
System.out.println(\"파일크기 : \"+file.length());
System.out.println(\"일기속성 : \"+file.canRead());
System.out.println(\"쓰기속성 : \"+file.canWrite());
System.out.println(\"파일경로 : \"+file.getParent());
System.out.println(\"숨김속성 : \"+file.isHidden());
}
}
뿌찍 아무 도움 안됨
댓글 0