Package org.eclipse.aether.util
Interface FileUtils.CollocatedTempFile
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,FileUtils.TempFile
- Enclosing class:
- FileUtils
public static interface FileUtils.CollocatedTempFile extends FileUtils.TempFile
A collocated temporary file, that resides next to a "target" file, and is removed when closed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
move()
Upon close, atomically moves temp file to target file it is collocated with overwriting target (if exists).-
Methods inherited from interface org.eclipse.aether.util.FileUtils.TempFile
getPath
-
-
-
-
Method Detail
-
move
void move() throws java.io.IOException
Upon close, atomically moves temp file to target file it is collocated with overwriting target (if exists). Invocation of this method merely signals that caller ultimately wants temp file to replace the target file, but when this method returns, the move operation did not yet happen, it will happen when this instance is closed.Invoking this method without writing to temp file
FileUtils.TempFile.getPath()
(thus, not creating a temp file to be moved) is considered a bug, a mistake of the caller. Caller of this method should ensure that this method is invoked ONLY when the temp file is created and moving it to its final place is required.- Throws:
java.io.IOException
-
-