Class PathUtils


  • public class PathUtils
    extends java.lang.Object
    Since:
    4.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String canonicalPath​(java.io.File file)
      Get canonical path and replace file separators by forward slash.
      static java.lang.String sanitize​(java.lang.String path)
      Normalize path and replace file separators by forward slash
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sanitize

        @CheckForNull
        public static java.lang.String sanitize​(@Nullable
                                                java.lang.String path)
        Normalize path and replace file separators by forward slash
      • canonicalPath

        @CheckForNull
        public static java.lang.String canonicalPath​(@Nullable
                                                     java.io.File file)
        Get canonical path and replace file separators by forward slash. This method does not throw boring checked exception.