public class CollapseFileName extends DerivePath
Specifically, a file-path of form somedirectory/somename.ext
and converts to somedirectory.ext
.
Constructor and Description |
---|
CollapseFileName() |
Modifier and Type | Method and Description |
---|---|
Path |
deriveFrom(Path source,
boolean debugMode)
Derives a new path from an existing path.
|
DerivePath |
getDerivePath()
Called as a delegate to provide a
source Path . |
boolean |
isKeepExtension()
When true, the extension is appended to the directory.
|
void |
setDerivePath(DerivePath derivePath)
Called as a delegate to provide a
source Path . |
void |
setKeepExtension(boolean keepExtension)
When true, the extension is appended to the directory.
|
deriveFrom
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public Path deriveFrom(Path source, boolean debugMode) throws DerivePathException
DerivePath
deriveFrom
in class DerivePath
source
- the path to derive from.debugMode
- true if debug-mode is activatedDerivePathException
- if anything goes wrongpublic DerivePath getDerivePath()
source
Path
.public void setDerivePath(DerivePath derivePath)
source
Path
.public boolean isKeepExtension()
public void setKeepExtension(boolean keepExtension)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.