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 voidcopy(File source, File target)longcopy(File source, File target, FileProcessor.ProgressListener listener)booleanmkdirs(File directory)Thread-safe variant ofFile.mkdirs().voidmove(File source, File target)voidwrite(File target, InputStream source)voidwrite(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:
mkdirsin interfaceFileProcessor- Parameters:
directory- The directory to create, may benull.- Returns:
trueif and only if the directory was created, along with all necessary parent directories;falseotherwise
-
write
public void write(File target, String data) throws IOException
- Specified by:
writein interfaceFileProcessor- Throws:
IOException
-
write
public void write(File target, InputStream source) throws IOException
- Specified by:
writein interfaceFileProcessor- Throws:
IOException
-
copy
public void copy(File source, File target) throws IOException
- Specified by:
copyin interfaceFileProcessor- Throws:
IOException
-
copy
public long copy(File source, File target, FileProcessor.ProgressListener listener) throws IOException
- Specified by:
copyin interfaceFileProcessor- Throws:
IOException
-
move
public void move(File source, File target) throws IOException
- Specified by:
movein interfaceFileProcessor- Throws:
IOException
-
-