public static String fullPath ( File file ) { notNull ( "file" , file ) ; try { return file . getCanonicalPath ( ) ; } catch ( IOException e ) { return file . getAbsolutePath ( ) ; } }
Gets the canonical path of the given file or if that throws an exception then gets the absolute path .