|
TrueZIP File* 7.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.file.TBIO
@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) @Immutable final class TBIO
Provides fast bulk I/O operations for Files and TFiles.
Note that in contrast to the TFile class, the methods in this
class accept plain old File objects.
However, full advantage is taken if a parameter is a TFile object.
| Field Summary | |
|---|---|
private static BitField<FsInputOption> |
NONEOF_INPUT_OPTIONS
|
private static BitField<FsOutputOption> |
NONEOF_OUTPUT_OPTIONS
|
| Constructor Summary | |
|---|---|
private |
TBIO()
You cannot instantiate this class. |
| Method Summary | |
|---|---|
private static void |
checkContains(File a,
File b)
Throws an IOException if and only if the path represented by
a contains the path represented by b, where a path is
said to contain another path if and only if it is equal or an ancestor
of the other path. |
static void |
cp_r(boolean preserve,
File src,
File dst,
TArchiveDetector srcDetector,
TArchiveDetector dstDetector)
Recursively copies the source directory tree or file to the destination directory tree or file. |
private static void |
cp_r0(boolean preserve,
File src,
File dst,
TArchiveDetector srcDetector,
TArchiveDetector dstDetector)
|
static void |
cp(boolean preserve,
File src,
File dst)
Copies a single source file to a destination file. |
private static void |
cp0(boolean preserve,
File src,
File dst)
|
(package private) static InputSocket<?> |
getInputSocket(File src,
BitField<FsInputOption> options)
|
(package private) static OutputSocket<?> |
getOutputSocket(File dst,
BitField<FsOutputOption> options,
Entry template)
|
static void |
mv(File src,
File dst,
TArchiveDetector detector)
Moves the source file or directory tree to the destination file or directory tree by performing a recursive cp-then-delete operation. |
private static void |
mv0(File src,
File dst,
TArchiveDetector detector)
Unchecked parameters version. |
static void |
rm_r(File node,
TArchiveDetector detector)
Recursively deletes the given file or directory tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final BitField<FsInputOption> NONEOF_INPUT_OPTIONS
private static final BitField<FsOutputOption> NONEOF_OUTPUT_OPTIONS
| Constructor Detail |
|---|
private TBIO()
| Method Detail |
|---|
public static void mv(File src,
File dst,
TArchiveDetector detector)
throws IOException
src - the source directory tree or file.
This file system entity needs to exist.dst - the destination directory tree or file.
This file systeme entity may or may not exist.
If it does, its contents are overwritten.detector - the object used to detect any archive files in the
source and destination paths.
IOException - if the source path contains the destination path
or an elementary operation fails for any reason.
private static void mv0(File src,
File dst,
TArchiveDetector detector)
throws IOException
IOException
public static void cp_r(boolean preserve,
File src,
File dst,
TArchiveDetector srcDetector,
TArchiveDetector dstDetector)
throws IOException
preserve - if an elementary cp operation shall cp as much
properties of the source file to the destination file, too.
Currently, only the last modification time is preserved.
Note that this property set may get extended over time.src - the source directory tree or file.
This file system entity needs to exist.dst - the destination directory tree or file.
This file systeme entity may or may not exist.
If it does, its contents are overwritten.srcDetector - the object used to detect any archive files in the
source path.dstDetector - the object used to detect any archive files in the
destination path.
IOException - if the source path contains the destination path
or an elementary operation fails for any reason.
private static void cp_r0(boolean preserve,
File src,
File dst,
TArchiveDetector srcDetector,
TArchiveDetector dstDetector)
throws IOException
IOException
public static void cp(boolean preserve,
File src,
File dst)
throws IOException
cp.
preserve - if an elementary cp operation shall cp as much
properties of the source file to the destination file, too.
Currently, only the last modification time is preserved.
Note that this property set may get extended over time.src - the source file.
This file system entity needs to exist.dst - the destination file.
This file systeme entity may or may not exist.
If it does, its contents are overwritten.
IOException - if the source path contains the destination path
or an elementary operation fails for any reason.
private static void cp0(boolean preserve,
File src,
File dst)
throws IOException
IOException
public static void rm_r(File node,
TArchiveDetector detector)
throws IOException
node - the file or directory tree to delete recursively.
IOException - if an elementary operation fails for any reason.
private static void checkContains(File a,
File b)
throws IOException
IOException if and only if the path represented by
a contains the path represented by b, where a path is
said to contain another path if and only if it is equal or an ancestor
of the other path.
Note that this method uses the absolute path of both files as if by
calling File.getAbsolutePath().
a - a file.b - another file.
IOException
static InputSocket<?> getInputSocket(File src,
BitField<FsInputOption> options)
static OutputSocket<?> getOutputSocket(File dst,
BitField<FsOutputOption> options,
@CheckForNull
Entry template)
|
TrueZIP File* 7.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||