Class CollapseFileName
Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.io.input.bean.path.DerivePath>
org.anchoranalysis.io.input.bean.path.DerivePath
org.anchoranalysis.plugin.io.bean.path.derive.CollapseFileName
public class CollapseFileName
extends org.anchoranalysis.io.input.bean.path.DerivePath
Removes the file-name from a path, but keeps the directories and preserves the file-extension.
Specifically, a file-path of form somedirectory/somename.ext and converts to
somedirectory.ext.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description CollapseFileName() -
Method Summary
Modifier and Type Method Description PathderiveFrom(Path source, boolean debugMode)org.anchoranalysis.io.input.bean.path.DerivePathgetDerivePath()Called as a delegate to provide asourcePath.booleanisKeepExtension()When true, the extension is appended to the directory.voidsetDerivePath(org.anchoranalysis.io.input.bean.path.DerivePath derivePath)Called as a delegate to provide asourcePath.voidsetKeepExtension(boolean keepExtension)When true, the extension is appended to the directory.
-
Constructor Details
-
CollapseFileName
public CollapseFileName()
-
-
Method Details
-
deriveFrom
public Path deriveFrom(Path source, boolean debugMode) throws org.anchoranalysis.io.input.path.DerivePathException- Specified by:
deriveFromin classorg.anchoranalysis.io.input.bean.path.DerivePath- Throws:
org.anchoranalysis.io.input.path.DerivePathException
-
getDerivePath
public org.anchoranalysis.io.input.bean.path.DerivePath getDerivePath()Called as a delegate to provide asourcePath. -
setDerivePath
public void setDerivePath(org.anchoranalysis.io.input.bean.path.DerivePath derivePath)Called as a delegate to provide asourcePath. -
isKeepExtension
public boolean isKeepExtension()When true, the extension is appended to the directory. -
setKeepExtension
public void setKeepExtension(boolean keepExtension)When true, the extension is appended to the directory.
-