java

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ java ] in KIDS
글 쓴 이(By): soaa (소어아)
날 짜 (Date): 2002년 3월 11일 월요일 오후 09시 11분 13초
제 목(Title): Re: [q] canonical/absolute path?


직접 돌려보시는 게 제일 이해하기 빠르 겁니다.

---- Test.java ----
import java.io.*;

public class Test {
  public static void main(String[] args) throws Exception {
    File file = new File("../../foo/bar.txt");
    System.out.println("Canonical Path: " + file.getCanonicalPath());
    System.out.println("Absolute  Path: " + file.getAbsolutePath());
  }
}
-------------------
결과는 다음과 같이 나오죠

d:\work\test\file> java Test
Canonical Path: d:\work\foo\bar.txt
Absolute  Path: d:\work\test\file\..\..\foo\bar.txt
.小 魚 兒 .............................
    ><>.     ><>.    그대 안의          
        ><>.               작은 물고기 
.......................작은............ 
[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.