Java Canonical Path Create getCanonicalPath(final String path)

Here you can find the source of getCanonicalPath(final String path)

Description

get Canonical Path

License

LGPL

Declaration

public static String getCanonicalPath(final String path) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.io.File;

public class Main {
    public static String getCanonicalPath(final String path) {
        try {/* ww w .j av  a2  s  .  com*/
            return (new File(path)).getCanonicalPath();
        } catch (Throwable ignored) {
            return path;
        }
    }
}

Related

  1. getCanonicalOrAbsolutePath(File file)
  2. getCanonicalPath(File file)
  3. getCanonicalPath(File inFile, boolean inThrowRuntimeException)
  4. getCanonicalPath(final File file)
  5. getCanonicalPath(final File file)
  6. getCanonicalPath(IPath fullPath)
  7. getCanonicalPath(IPath fullPath)
  8. getCanonicalPath(String basePath, String path)
  9. getCanonicalPath(String filePath, String prefix)