getAbsolutePath() 得到绝对路径、全路径。getpath 得到缩写的路径,根据当前目录位置可以缩写路径。得到相对路径。getCanonicalPath() 得到标准路径,将统一平台间的路径写法差异。
前面是得到绝对路径后面的是抽象 的getCanonicalPath()Returns the canonical pathname string of this abstract pathname.