Package org.eclipse.aether.internal.impl
Class DefaultFileProcessor
- java.lang.Object
-
- org.eclipse.aether.internal.impl.DefaultFileProcessor
-
- All Implemented Interfaces:
FileProcessor
@Named public class DefaultFileProcessor extends Object implements FileProcessor
A utility class helping with file-based operations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.aether.spi.io.FileProcessor
FileProcessor.ProgressListener
-
-
Constructor Summary
Constructors Constructor Description DefaultFileProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copy(File source, File target)
long
copy(File source, File target, FileProcessor.ProgressListener listener)
boolean
mkdirs(File directory)
Thread-safe variant ofFile.mkdirs()
.void
move(File source, File target)
void
write(File target, InputStream source)
void
write(File target, String data)
-
-
-
Constructor Detail
-
DefaultFileProcessor
public DefaultFileProcessor()
-
-
Method Detail
-
mkdirs
public boolean mkdirs(File directory)
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 interfaceFileProcessor
- 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
public void write(File target, String data) throws IOException
- Specified by:
write
in interfaceFileProcessor
- Throws:
IOException
-
write
public void write(File target, InputStream source) throws IOException
- Specified by:
write
in interfaceFileProcessor
- Throws:
IOException
-
copy
public void copy(File source, File target) throws IOException
- Specified by:
copy
in interfaceFileProcessor
- Throws:
IOException
-
copy
public long copy(File source, File target, FileProcessor.ProgressListener listener) throws IOException
- Specified by:
copy
in interfaceFileProcessor
- Throws:
IOException
-
move
public void move(File source, File target) throws IOException
- Specified by:
move
in interfaceFileProcessor
- Throws:
IOException
-
-