Package com.apple.foundationdb.directory
Class PathUtil
java.lang.Object
com.apple.foundationdb.directory.PathUtil
The
PathUtil
class provides static helper functions useful for working
with directory paths.-
Method Summary
Modifier and TypeMethodDescriptionExtends a path by an arbitrary number of elements.Creates a new path from an arbitrary number of elements.Joins two paths into one larger path.Removes the last item from a path.Removes the first item from a path.
-
Method Details
-
join
Joins two paths into one larger path.- Parameters:
path1
- The first path to joinpath2
- The path to append topath1
- Returns:
- a new list which contains all the items in
path1
followed by all the items inpath2
-
extend
Extends a path by an arbitrary number of elements.- Parameters:
path
- The path to extendsubPaths
- The items to append to path- Returns:
- a new list which contains all the items in
path
followed by all additional items specified insubPaths
-
from
Creates a new path from an arbitrary number of elements.- Parameters:
subPaths
- The items in the path- Returns:
- a list which contains all the items specified in
subPaths
-
popFront
Removes the first item from a path.- Parameters:
path
- the path whose first item is being popped- Returns:
- a new list which contains all the items in
path
except for the first item
-
popBack
Removes the last item from a path.- Parameters:
path
- the path whose last item is being popped- Returns:
- a new list which contains all the items in
path
except for the last item
-