Returns a relative path as used in a URI or *nix directory - with '..' used to denote navigating up one element in the tree.
Returns a relative path as used in a URI or *nix directory - with '..' used to denote navigating up one element in the tree.
scala> relativePath(List("1","2"),{1 to 5}.map{_.toString}.toList) res0: String = 3/4/5 scala> relativePath(List("1","other","thing"),{1 to 5}.map{_.toString}.toList) res1: String = ../2/3/4/5
Returns the lists given as arguments with any sequence common to the two removed from the start
Returns the lists given as arguments with any sequence common to the two removed from the start
scala> removeCommon({1 to 5}.toList, List(1,2)) res0: (List[Int], List[Int]) = (List(3, 4, 5),List())