2015. 1. 3. 18:37
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

package IO;

import java.io.File;

public class fileIO {
    public static void main(String[] args){
        File f=new File("/org.txt");
        if(f.exists()){
            System.out.println("파일이름 : "+ f.getName());
            System.out.println("상대경로 : "+ f.getPath());
            System.out.println("절대경로 : "+ f.getAbsolutePath());
            System.out.println("쓰기가능 :"+ f.canWrite());
            System.out.println("읽기가능 : "+ f.canRead());
            System.out.println("파일길이 : "+f.length());
        }
    }
}

'Java' 카테고리의 다른 글

URL class, figuring the page source  (0) 2015.01.06
CopyFile getting a new name from the console  (0) 2015.01.03
searching Directories  (0) 2015.01.03
a Simple example copying a file  (0) 2015.01.03
InputStream / OutputStream 데이터 흐름  (0) 2015.01.02
Posted by af334