Package uk.blankaspect.common.filesystem
Class PathUtils
java.lang.Object
uk.blankaspect.common.filesystem.PathUtils
This class contains utility methods that relate to file-system locations.
- 
Method Summary
Modifier and TypeMethodDescriptionstatic PathConverts the specified file-system location to a normalised absolute location and returns the result.static PathConverts the specified file-system location to a normalised absolute location and returns the parent of the resulting location.static StringConverts the specified file-system location to a normalised absolute location and returns a string representation of the resulting location.static StringabsStringStd(Path location) Converts the specified file-system location to a normalised absolute location and returns a string representation of the resulting location in which the system-dependent separators between adjacent components are replaced by Unix separators,'/'.convertLocations(Iterable<? extends File> files) static StringConcatenates the string representations of the specified locations, with adjacent locations separated by the system-dependent separator character, and returns the resulting string.static StringConcatenates the string representations of the specified locations, with adjacent locations separated by the system-dependent separator character, and returns the resulting string. 
- 
Method Details
- 
abs
Converts the specified file-system location to a normalised absolute location and returns the result. The following methods are called sequentially on the input location:- Parameters:
 location- the location of interest.- Returns:
 locationconverted to an absolute location and normalised.
 - 
absParent
Converts the specified file-system location to a normalised absolute location and returns the parent of the resulting location. The following methods are called sequentially on the input location:- Parameters:
 location- the location of interest.- Returns:
 - the parent of 
locationafter it is converted to an absolute location and normalised. 
 - 
absString
Converts the specified file-system location to a normalised absolute location and returns a string representation of the resulting location. The following methods are called sequentially on the input location:- Parameters:
 location- the location of interest.- Returns:
 - a string representation of 
locationafter it is converted to an absolute location and normalised. 
 - 
absStringStd
Converts the specified file-system location to a normalised absolute location and returns a string representation of the resulting location in which the system-dependent separators between adjacent components are replaced by Unix separators,'/'. The following methods are called sequentially on the input location:- Parameters:
 location- the location of interest.- Returns:
 - a string representation of 
locationafter it is converted to an absolute location and normalised. In the string representation, the system-dependent separators between adjacent components are replaced by Unix separators,'/'. 
 - 
join
Concatenates the string representations of the specified locations, with adjacent locations separated by the system-dependent separator character, and returns the resulting string.- Parameters:
 locations- the locations that will be concatenated.- Returns:
 - a concatenation of the string representations of 
locations, with adjacent locations separated by the system-dependent separator character. 
 - 
join
Concatenates the string representations of the specified locations, with adjacent locations separated by the system-dependent separator character, and returns the resulting string.- Parameters:
 locations- the locations that will be concatenated.- Returns:
 - a concatenation of the string representations of 
locations, with adjacent locations separated by the system-dependent separator character. 
 - 
convertLocations
Returns a list ofPaths in which each element corresponds to an element of the specified input sequence ofFiles.- Parameters:
 files- the locations that will be converted.- Returns:
 - a list of 
Paths in which each element corresponds to an element of the input sequence. 
 
 -