Package org.eclipse.aether.spi.io
Interface FileProcessor
Deprecated.
A utility component to perform file-based operations.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Deprecated.A listener object that is notified for every progress made while copying files. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Copies the specified source file to the given target file.long
copy
(File source, File target, FileProcessor.ProgressListener listener) Deprecated.Copies the specified source file to the given target file.boolean
Deprecated.Creates the directory named by the given abstract pathname, including any necessary but nonexistent parent directories.void
Deprecated.Moves the specified source file to the given target file.readChecksum
(File checksumFile) Deprecated.Reads checksum from specified file.void
write
(File target, InputStream source) Deprecated.Writes the given stream to a file.void
Deprecated.Writes the given data to a file.void
writeChecksum
(File checksumFile, String checksum) Deprecated.Writes checksum to specified file.
-
Method Details
-
mkdirs
Deprecated.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.- 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
Deprecated.Writes the given data to a file. UTF-8 is assumed as encoding for the data. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Parameters:
target
- The file to write to, must not benull
. This file will be overwritten.data
- The data to write, may benull
.- Throws:
IOException
- If an I/O error occurs.
-
write
Deprecated.Writes the given stream to a file. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Parameters:
target
- The file to write to, must not benull
. This file will be overwritten.source
- The stream to write to the file, must not benull
.- Throws:
IOException
- If an I/O error occurs.
-
move
Deprecated.Moves the specified source file to the given target file. If the target file already exists, it is overwritten. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Parameters:
source
- The file to move from, must not benull
.target
- The file to move to, must not benull
.- Throws:
IOException
- If an I/O error occurs.
-
copy
Deprecated.Copies the specified source file to the given target file. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Parameters:
source
- The file to copy from, must not benull
.target
- The file to copy to, must not benull
.- Throws:
IOException
- If an I/O error occurs.
-
copy
Deprecated.Copies the specified source file to the given target file. Creates the necessary directories for the target file. In case of an error, the created directories will be left on the file system.- Parameters:
source
- The file to copy from, must not benull
.target
- The file to copy to, must not benull
.listener
- The listener to notify about the copy progress, may benull
.- Returns:
- The number of copied bytes.
- Throws:
IOException
- If an I/O error occurs.
-
readChecksum
Deprecated.Reads checksum from specified file.- Throws:
IOException
- in case of any IO error.- Since:
- 1.8.0
-
writeChecksum
Deprecated.Writes checksum to specified file.- Throws:
IOException
- in case of any IO error.- Since:
- 1.8.0
-
PathProcessor
orChecksumProcessor
instead.