Class SymlinkFileTransfer

  • All Implemented Interfaces:
    FileTransfer

    public class SymlinkFileTransfer
    extends AbstractExecFileTransfer
    Local-only file transfer mechanism which makes use of soft-linking. This is only useful where the commands "ln -s source target" (Unix) or "mklink target source" (Windows) will work.
    Since:
    5.0
    • Constructor Detail

      • SymlinkFileTransfer

        public SymlinkFileTransfer()
    • Method Detail

      • createProcessBuilder

        protected java.lang.ProcessBuilder createProcessBuilder​(java.io.File file,
                                                                java.io.File location)
        Executes "ln -s file location" (Unix) or "mklink location file" (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)
        No cleanup is needed for soft-linking.