Class SMBPathUtil


  • public final class SMBPathUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isAbsolutePath​(java.lang.String path)
      Checks if provided path string is an absolute path (i.e.
      static boolean isFolder​(java.lang.String path)
      Checks if the provided path string points to a folder (i.e.
      static boolean isRelativePath​(java.lang.String path)
      Checks if provided path string is a relative path (i.e.
      static java.lang.String mergePath​(java.lang.String[] components, int start, int end, boolean absolute, boolean folder)
      Merges the provided path components into a single pat string.
      static java.lang.String[] splitPath​(java.lang.String path)
      Splits the provided path string into its path components.
      • Methods inherited from class java.lang.Object

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

      • isFolder

        public static boolean isFolder​(java.lang.String path)
        Checks if the provided path string points to a folder (i.e. ends with an /).
        Parameters:
        path - Path that should be checked.
        Returns:
        True if provided path points to a folder and false otherwise.
      • isAbsolutePath

        public static boolean isAbsolutePath​(java.lang.String path)
        Checks if provided path string is an absolute path (i.e. starts with an /).
        Parameters:
        path - Path that should be checked.
        Returns:
        True if provided path is a relative path and false otherwise.
      • isRelativePath

        public static boolean isRelativePath​(java.lang.String path)
        Checks if provided path string is a relative path (i.e. does not start with an /).
        Parameters:
        path - Path that should be checked.
        Returns:
        True if provided path is a relative path and false otherwise.
      • splitPath

        public static java.lang.String[] splitPath​(java.lang.String path)
        Splits the provided path string into its path components.
        Parameters:
        path - Path string that should be split.
        Returns:
        Array of path components.
      • mergePath

        public static java.lang.String mergePath​(java.lang.String[] components,
                                                 int start,
                                                 int end,
                                                 boolean absolute,
                                                 boolean folder)
        Merges the provided path components into a single pat string.
        Parameters:
        components - Array of path components.
        start - Index of the first item in the list that should be considered; inclusive.
        end - Index of the last item in the list that should be considered; exclusive.
        absolute - Boolean indicating whether resulting path should be treated as absolute path.
        folder - Boolean indicating whether resulting path should point to a folder.
        Returns:
        Resulting path string