public interface PathCreator
Modifier and Type | Method and Description |
---|---|
Path |
makePathAbsolute(Optional<String> suffix,
Optional<String> extension,
String fallbackSuffix)
Generates a full path, given the final part (suffix) of a path.
|
Path |
makePathRelative(Path suffix)
Extracts a relative-file path, given the final part (suffix) of a path.
|
Path makePathAbsolute(Optional<String> suffix, Optional<String> extension, String fallbackSuffix)
All sub-directories are created if needed to ensure it's possible to write to the fullPath.
suffix
- the final part of the path, to be added to the prefixextension
- a file extension (without a leading string)fallbackSuffix
- if neither a prefix
is defined nor a suffix
, then this
provides a suffix to use so a file isn't only an extension.Path makePathRelative(Path suffix)
The path will be relative to the underlying root directory
.
This relative-path includes any filename-prefix added by the DirectoryWithPrefix
.
suffix
- the final part of the path, to be added to the prefixCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.