public class RelativeToDirectory extends FileNamerIndependent
If no input-directory exists, a name cannot be constructed.
Any directory seperator in the he path is always expressed with forward-slashes, even if backslashes are used by the operating system.
Constructor and Description |
---|
RelativeToDirectory() |
Modifier and Type | Method and Description |
---|---|
protected String |
deriveName(File file,
Optional<Path> inputDirectory,
int index)
Derives a unique name for this file.
|
deriveName
deriveName, deriveNameUnique
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
protected String deriveName(File file, Optional<Path> inputDirectory, int index) throws CreateException
FileNamerIndependent
deriveName
in class FileNamerIndependent
file
- the file.inputDirectory
- the root input-directory used in naming.index
- a unique incrementing number, beginning at zero, passed to each call to this
method within a collection.CreateException
- if unable to create the unique name.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.