Package org.eclipse.aether.internal.impl
Class DefaultFileProcessor
java.lang.Object
org.eclipse.aether.internal.impl.DefaultFileProcessor
- All Implemented Interfaces:
org.eclipse.aether.spi.io.FileProcessor
@Singleton
@Named
public class DefaultFileProcessor
extends Object
implements org.eclipse.aether.spi.io.FileProcessor
A utility class helping with file-based operations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.aether.spi.io.FileProcessor
org.eclipse.aether.spi.io.FileProcessor.ProgressListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
long
boolean
Thread-safe variant ofFile.mkdirs()
.void
readChecksum
(File checksumFile) void
write
(File target, InputStream source) void
void
writeChecksum
(File checksumFile, String checksum)
-
Constructor Details
-
DefaultFileProcessor
public DefaultFileProcessor()
-
-
Method Details
-
mkdirs
Thread-safe variant ofFile.mkdirs()
. Creates the directory named by the given abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.- Specified by:
mkdirs
in interfaceorg.eclipse.aether.spi.io.FileProcessor
- Parameters:
directory
- The directory to create, may benull
.- Returns:
true
if and only if the directory was created, along with all necessary parent directories;false
otherwise
-
write
- Specified by:
write
in interfaceorg.eclipse.aether.spi.io.FileProcessor
- Throws:
IOException
-
write
- Specified by:
write
in interfaceorg.eclipse.aether.spi.io.FileProcessor
- Throws:
IOException
-
copy
- Specified by:
copy
in interfaceorg.eclipse.aether.spi.io.FileProcessor
- Throws:
IOException
-
copy
public long copy(File source, File target, org.eclipse.aether.spi.io.FileProcessor.ProgressListener listener) throws IOException - Specified by:
copy
in interfaceorg.eclipse.aether.spi.io.FileProcessor
- Throws:
IOException
-
move
- Specified by:
move
in interfaceorg.eclipse.aether.spi.io.FileProcessor
- Throws:
IOException
-
readChecksum
- Specified by:
readChecksum
in interfaceorg.eclipse.aether.spi.io.FileProcessor
- Throws:
IOException
-
writeChecksum
- Specified by:
writeChecksum
in interfaceorg.eclipse.aether.spi.io.FileProcessor
- Throws:
IOException
-