Klasse ShallowCopier

java.lang.Object
de.zocher_regel.util.copy.AbstractCopier
de.zocher_regel.util.copy.ShallowCopier
Alle implementierten Schnittstellen:
Runnable

public class ShallowCopier extends AbstractCopier
Copy a directory whith subdirectories to another location (e. g. USB-stick) Make the subdirectories flat.
  • Konstruktordetails

    • ShallowCopier

      public ShallowCopier(Path sourceDirPath, Path targetDirPath, FilenameFilter filenameFilter, FileFilter fileFilter, FileCompareFilter fileCompareFilter) throws UtilException
      Constructor
      Parameter:
      sourceDirPath - from which the files will be copied
      targetDirPath - to which the files will be copied
      filenameFilter - filters the files to be copied
      fileFilter - filters the files to be copied
      fileCompareFilter - decides whether the file is copied if the target file exists
      Löst aus:
      UtilException - if sourceDirPath or targetDirPath do not exist
  • Methodendetails

    • getTargetFilePath

      protected Path getTargetFilePath(File sourceFile)
      The intermediate directories are omitted.
      Angegeben von:
      getTargetFilePath in Klasse AbstractCopier
      Parameter:
      sourceFile - the file to be copied
      Gibt zurück:
      the path of target file, the directory tree of the sourceFile is flattened.