public class RemoveExtension extends FileNamer
As an exception, the extension can be retained if there is more than one file with the same identifier.
To check if the extension has already been removed upstream, a check occurs if the path ends with the identifier.
Constructor and Description |
---|
RemoveExtension() |
RemoveExtension(FileNamer namer) |
Modifier and Type | Method and Description |
---|---|
List<NamedFile> |
deriveName(List<File> files,
FileNamerContext context)
Derives a list of names (associated with each file) for some files.
|
FileNamer |
getNamer() |
boolean |
isPreserveExtensionIfDuplicate()
Keeps the extension if the file-name (without the extension) becomes duplicated with another.
|
void |
setNamer(FileNamer namer) |
void |
setPreserveExtensionIfDuplicate(boolean preserveExtensionIfDuplicate)
Keeps the extension if the file-name (without the extension) becomes duplicated with another.
|
deriveName, deriveNameUnique
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public RemoveExtension(FileNamer namer)
public RemoveExtension()
public List<NamedFile> deriveName(List<File> files, FileNamerContext context)
FileNamer
deriveName
in class FileNamer
files
- the files to describe.context
- additional context for naming.public FileNamer getNamer()
public void setNamer(FileNamer namer)
public boolean isPreserveExtensionIfDuplicate()
public void setPreserveExtensionIfDuplicate(boolean preserveExtensionIfDuplicate)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.