Class UnixPath


  • public final class UnixPath
    extends java.lang.Object
    Class for manipulating Unix-like paths. Provides a standard way to add children to the paths so that we do not have to deal all the time with the path delimiters.
    • Method Detail

      • of

        public static UnixPath of​(java.lang.String... path)
      • fromString

        public static UnixPath fromString​(java.lang.String childPath)
      • isRoot

        public boolean isRoot()
      • getParent

        public java.util.Optional<UnixPath> getParent()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • addChild

        public UnixPath addChild​(java.lang.String childPath)
      • getFilename

        public java.lang.String getFilename()
      • removeRoot

        public UnixPath removeRoot()