public final class DirectoryInventory extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
DirectoryInventory.DeltaRecord
Records a single change between two inventories.
|
static class |
DirectoryInventory.DeltaType |
static interface |
DirectoryInventory.IDeltaListener
This listener receives all changes found by comparing two DirectoryInventory objects.
|
static class |
DirectoryInventory.InvEntry |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareArrays(byte[] aa,
byte[] ba) |
List<DirectoryInventory.DeltaRecord> |
compareTo(DirectoryInventory other)
Compare to inventories and return a list of changes.
|
void |
compareTo(DirectoryInventory other,
DirectoryInventory.IDeltaListener listener)
Compare this and another inventory, and generate events that tell how THIS would need to change to become OTHER.
|
static DirectoryInventory |
create(File src)
Create an inventory for the specified directory by scanning and reading all files.
|
static DirectoryInventory |
createEmpty() |
long |
getCreationTime() |
int |
getNumDirectories() |
int |
getNumFiles() |
static DirectoryInventory |
load(File src)
Load the inventory from a file.
|
static void |
main(String[] args) |
void |
save(File src)
Saves the entire inventory.
|
<R> R |
visit(FunctionEx<DirectoryInventory.InvEntry,R> consumer)
Visits all entries.
|
@Nonnull public static DirectoryInventory createEmpty()
@Nonnull public static DirectoryInventory create(@Nonnull File src) throws Exception
src - Exception@Nonnull public static DirectoryInventory load(@Nonnull File src) throws Exception
src - Exceptionpublic void compareTo(@Nonnull DirectoryInventory other, @Nonnull DirectoryInventory.IDeltaListener listener) throws Exception
other - Exception@Nonnull public List<DirectoryInventory.DeltaRecord> compareTo(@Nonnull DirectoryInventory other)
other - @Nullable public <R> R visit(@Nonnull FunctionEx<DirectoryInventory.InvEntry,R> consumer) throws Exception
consumer - Exceptionpublic int getNumFiles()
public int getNumDirectories()
public long getCreationTime()
Copyright © 2017 etc.to. All rights reserved.