org.sonatype.aether.impl.internal
Class DefaultFileProcessor
java.lang.Object
org.sonatype.aether.impl.internal.DefaultFileProcessor
- All Implemented Interfaces:
- FileProcessor
@Component(role=org.sonatype.aether.spi.io.FileProcessor.class)
public class DefaultFileProcessor
- extends Object
- implements FileProcessor
A utility class helping with file-based operations.
- Author:
- Benjamin Hanzelmann, Benjamin Bentmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultFileProcessor
public DefaultFileProcessor()
mkdirs
public boolean mkdirs(File directory)
- Thread-safe variant of
File.mkdirs(). Adapted from Java 6. 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 interface FileProcessor
- Parameters:
directory - The directory to create, may be null.
- Returns:
true if and only if the directory was created, along with all necessary parent directories;
false otherwise
write
public void write(File file,
String data)
throws IOException
- Specified by:
write in interface FileProcessor
- Throws:
IOException
copy
public long copy(File source,
File target,
FileProcessor.ProgressListener listener)
throws IOException
- Specified by:
copy in interface FileProcessor
- Throws:
IOException
move
public void move(File source,
File target)
throws IOException
- Specified by:
move in interface FileProcessor
- Throws:
IOException
Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.