Java Canonical Path Create getCanonicalFileName(String filename)

Here you can find the source of getCanonicalFileName(String filename)

Description

get Canonical File Name

License

Apache License

Declaration

public static String getCanonicalFileName(String filename) 

Method Source Code

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

import java.io.File;

import java.io.IOException;

public class Main {

    public static String getCanonicalFileName(String filename) {
        String canonicalFileName = filename;
        try {//from ww  w.jav  a 2 s. c om
            canonicalFileName = new File(filename).getCanonicalPath();
        } catch (IOException ignore) {
        }
        return canonicalFileName;
    }
}

Related

  1. getCanonicalFile(File inFile)
  2. getCanonicalFile(final File file)
  3. getCanonicalFile(final File file)
  4. getCanonicalFile(final File file)
  5. getCanonicalFileEL(File file)
  6. getCanonicalFileOrNull(@Nullable final File aFile)
  7. getCanonicalFiles2List(List path, String[] allowedExtension)
  8. getCanonicalFileURL(File file)
  9. getCanonicalLocationFilePath(String location, String file)