Here you can find the source of getCanonicalPathQuietly(String inPath)
public static File getCanonicalPathQuietly(String inPath)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static File getCanonicalPathQuietly(String inPath) { return getCanonicalPathQuietly(inPath, false); }//from w w w .j a va 2 s. c o m public static File getCanonicalPathQuietly(String inPath, boolean inReturnAbsolutPathInstead) { return inPath == null ? null : getCanonicalPathQuietly(new File(inPath), inReturnAbsolutPathInstead); } public static File getCanonicalPathQuietly(File inFile) { return getCanonicalPathQuietly(inFile, false); } public static File getCanonicalPathQuietly(File inFile, boolean inReturnAbsolutPathInstead) { try { return inFile.getCanonicalFile(); } catch (final Exception e) { try { return inReturnAbsolutPathInstead ? inFile.getAbsoluteFile() : null; } catch (final Exception e2) { } } return null; } }