Class PreserveName

Object
org.anchoranalysis.bean.AnchorBean<CopyFilesNaming<T>>
org.anchoranalysis.plugin.io.bean.file.copy.naming.CopyFilesNaming<org.anchoranalysis.experiment.task.NoSharedState>
org.anchoranalysis.plugin.io.bean.file.copy.naming.CopyFilesNamingWithoutSharedState
org.anchoranalysis.plugin.io.bean.file.copy.naming.PreserveName

public class PreserveName
extends CopyFilesNamingWithoutSharedState
Copies files to maintain the same relative-path from the destination file to the destination-directory, as existed from the source file to the source-directory.
Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • beforeCopying

      public org.anchoranalysis.experiment.task.NoSharedState beforeCopying​(Path destinationDirectory, List<org.anchoranalysis.io.input.file.FileWithDirectoryInput> inputs)
      Description copied from class: CopyFilesNaming
      Overrides:
      beforeCopying in class CopyFilesNamingWithoutSharedState
      Parameters:
      destinationDirectory - the directory to which files are copied.
      inputs - the total number of files to copy.
    • destinationPathRelative

      public Optional<Path> destinationPathRelative​(File file, org.anchoranalysis.io.output.path.prefixer.DirectoryWithPrefix outputTarget, int iter, CopyContext<org.anchoranalysis.experiment.task.NoSharedState> context) throws org.anchoranalysis.io.output.error.OutputWriteFailedException
      Description copied from class: CopyFilesNaming
      Calculates the relative-output path (to be appended to destDir)
      Specified by:
      destinationPathRelative in class CopyFilesNaming<org.anchoranalysis.experiment.task.NoSharedState>
      Parameters:
      file - file to be copied
      outputTarget - the directory and prefix associated with the file for outputting
      iter - an increasing sequence of numbers for each file beginning at 0
      context - the context for the copying
      Returns:
      the relative-path. if empty, the file should be skipped.
      Throws:
      org.anchoranalysis.io.output.error.OutputWriteFailedException