The Path object is used to standard used to standardize the creation of mutation of path-like structures. For: example /foo/bar/index.html.
Below are the rules for how the constructor interprets literal paths. NOTE the {@link addSegment(String)} interprets stringpathes in a somewhat different manner.
Literal Path | Interpretation | /foo/bar/index.html | foo and bar will be considered directory segments while index.html will be considered a file segment. This means that the baseName will be set to index and the fileExtension will be set to .html |
---|---|
/foo/bar/, /foo/bar, foo/bar/ foo/bar | I cases where a file has no extension you must use the {@link setFileSegment(String))} to manually set the file. This causes the |
|
|
|
|