Java Canonical Path Create getCanonicalFileEL(File file)

Here you can find the source of getCanonicalFileEL(File file)

Description

Returns the canonical form of this abstract pathname.

License

LGPL

Parameter

Parameter Description
file file to get canoncial form from it

Exception

Parameter Description
SecurityException If a required system property value cannot be accessed.

Return

The canonical pathname string denoting the same file or directory as this abstract pathname

Declaration

public static File getCanonicalFileEL(File file) 

Method Source Code

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

import java.io.File;
import java.io.IOException;

public class Main {
    /**/*  www  .j  av  a  2 s  .  c o m*/
     * Returns the canonical form of this abstract pathname.
     * @param file file to get canoncial form from it
     *
     * @return  The canonical pathname string denoting the same file or
     *          directory as this abstract pathname
     *
     * @throws  SecurityException
     *          If a required system property value cannot be accessed.
     */
    public static File getCanonicalFileEL(File file) {
        try {
            return file.getCanonicalFile();
        } catch (IOException e) {
            return file;
        }
    }
}

Related

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