java.io.File動作確認

001: package heta.test;
002: 
003: import java.io.File;
004: import java.io.IOException;
005: 
006: public class FileTester {
007: 
008:   public static void main(String[] args) throws IOException {
009: 
010:     File f = new File("../work");
011:     System.out.println("getAbsolutePath() : " + f.getAbsolutePath());
012:     System.out.println("getCanonicalPath(): " + f.getCanonicalPath());
013:     System.out.println("getName()         : " + f.getName());
014:     System.out.println("getParent()       : " + f.getParent());
015:     System.out.println("getPath()         : " + f.getPath());
016:   }
017: }
getAbsolutePath() : E:\workspace\work\..\work
getCanonicalPath(): E:\workspace\work
getName()         : work
getParent()       : ..
getPath()         : ..\work