Class RelativeToDirectory

Object
AnchorBean<FileNamer>
FileNamer
FileNamerIndependent
RelativeToDirectory

public class RelativeToDirectory extends FileNamerIndependent
Constructs a name by finding the relative-path between the file and the input-directory.

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.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    deriveName(File file, Optional<Path> inputDirectory, int index)
     

    Methods inherited from class org.anchoranalysis.io.input.bean.namer.FileNamerIndependent

    deriveName

    Methods inherited from class org.anchoranalysis.io.input.bean.namer.FileNamer

    deriveName, deriveNameUnique

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RelativeToDirectory

      public RelativeToDirectory()
  • Method Details

    • deriveName

      protected String deriveName(File file, Optional<Path> inputDirectory, int index) throws CreateException
      Specified by:
      deriveName in class FileNamerIndependent
      Throws:
      CreateException