Class CopyFileTransfer

  • All Implemented Interfaces:
    FileTransfer
    Direct Known Subclasses:
    CopyMoveFileTransfer

    public class CopyFileTransfer
    extends AbstractExecFileTransfer
    Local-only file transfer mechanism which makes use of the plaform copy command. This is only useful where the commands "cp source target" (Unix) or "copy source target" (Windows) will work.
    Since:
    5.0.7
    • Constructor Detail

      • CopyFileTransfer

        public CopyFileTransfer()
    • Method Detail

      • createProcessBuilder

        protected java.lang.ProcessBuilder createProcessBuilder​(java.io.File file,
                                                                java.io.File location)
        Executes "cp file location" (Unix) or "cp file location" (Windows) and fails on non-0 return codes.
        Specified by:
        createProcessBuilder in class AbstractExecFileTransfer
        Parameters:
        file - File to be copied
        location - Location to copy to.
        Returns:
        an instance ready for performing the transfer
        Throws:
        java.io.IOException
      • afterTransfer

        public void afterTransfer​(int errors,
                                  java.util.List<java.lang.String> srcFiles)
                           throws CleanupFailure
        No cleanup action is taken.
        Throws:
        CleanupFailure