Package ome.formats.importer.transfers
Class HardlinkFileTransfer
- java.lang.Object
-
- ome.formats.importer.transfers.AbstractFileTransfer
-
- ome.formats.importer.transfers.AbstractExecFileTransfer
-
- ome.formats.importer.transfers.HardlinkFileTransfer
-
- All Implemented Interfaces:
FileTransfer
- Direct Known Subclasses:
MoveFileTransfer
public class HardlinkFileTransfer extends AbstractExecFileTransfer
Local-only file transfer mechanism which makes use of hard-linking. This is only useful where the commands "ln source target" (Unix) or "mklink /H target source" (Windows) will work.- Since:
- 5.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ome.formats.importer.transfers.AbstractFileTransfer
AbstractFileTransfer.Transfers
-
-
Field Summary
-
Fields inherited from class ome.formats.importer.transfers.AbstractFileTransfer
log
-
-
Constructor Summary
Constructors Constructor Description HardlinkFileTransfer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterTransfer(int errors, java.util.List<java.lang.String> srcFiles)
No cleanup action is taken.protected java.lang.ProcessBuilder
createProcessBuilder(java.io.File file, java.io.File location)
Executes "ln file location" (Unix) or "mklink /H location file" (Windows) and fails on non-0 return codes.-
Methods inherited from class ome.formats.importer.transfers.AbstractExecFileTransfer
checkLocation, checkTarget, exec, failLocationCheck, getLocalLocation, printLine, transfer
-
Methods inherited from class ome.formats.importer.transfers.AbstractFileTransfer
cleanupUpload, createTransfer, deleteTransferredFiles, finish, isWindows, start
-
-
-
-
Method Detail
-
createProcessBuilder
protected java.lang.ProcessBuilder createProcessBuilder(java.io.File file, java.io.File location)
Executes "ln file location" (Unix) or "mklink /H location file" (Windows) and fails on non-0 return codes.- Specified by:
createProcessBuilder
in classAbstractExecFileTransfer
- 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
-
-