Here you can find the source of getCanonicalPath(String path)
Parameter | Description |
---|---|
path | Absolute or relative file path |
Parameter | Description |
---|
public static String getCanonicalPath(String path) throws IOException
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { /**/*from w w w .j av a2 s . com*/ * Returns canonical file path for the given file path * * @param path Absolute or relative file path * @return Canonical file path * @throws java.io.IOException Thrown if canonical file path could not be resolved */ public static String getCanonicalPath(String path) throws IOException { return new File(path).getCanonicalPath(); } }