public class Add extends Object
Constructor and Description |
---|
Add() |
Modifier and Type | Method and Description |
---|---|
ArrayList<String> |
addExclude(ArrayList<String> list) |
long |
addFiles(String path)
Scan a path and provide a list of modified or new items.
|
ArrayList<String> |
getExclude() |
boolean |
getProgress() |
boolean |
getRecursive() |
boolean |
getUpdate() |
boolean |
getVerbose() |
static void |
main(String[] args)
Command-line interface.
|
long |
scan(PrintStream out,
ArrayList<String> existingList,
String path)
Scan a path and write checksums for new items.
|
long |
scan(PrintStream out,
String base,
String path,
HashMap<String,ChecksumRecord> localMap,
ExecutorService executor)
Scan a path and write checksums for new items.
|
ArrayList<String> |
setExclude(ArrayList<String> list) |
boolean |
setProgress(boolean state) |
boolean |
setRecursive(boolean state) |
boolean |
setUpdate(boolean state) |
boolean |
setVerbose(boolean state) |
void |
showHelp()
Show the help for the tool.
|
public static void main(String[] args)
args
- command-line arguments.public void showHelp()
public long addFiles(String path) throws Exception
path
- the pathname of the file containing the checksum records.Exception
- if any error occurs.public long scan(PrintStream out, ArrayList<String> existingList, String path) throws Exception
out
- the stream to the file to write checksum information.existingList
- list of existing files. Checksum is not written for an existing filepath
- the file system path to scan for files.Exception
- if any error occurs.public long scan(PrintStream out, String base, String path, HashMap<String,ChecksumRecord> localMap, ExecutorService executor) throws Exception
out
- the stream to the file to write checksum information.base
- the base path to the starting point of the scan.path
- the file system path to scan for files.existingList
- list of existing files. Checksum is not written for an existing fileexecuter
- the task executorException
- if any error occurs.public boolean getProgress()
public boolean setProgress(boolean state)
public boolean getUpdate()
public boolean setUpdate(boolean state)
public boolean getVerbose()
public boolean setVerbose(boolean state)
public boolean getRecursive()
public boolean setRecursive(boolean state)
Copyright © 2014-2016 Regents University of California. All Rights Reserved.