au.gov.tas.dpiwe.mr.tool
Class MultiCount
java.lang.Object
au.gov.tas.dpiwe.mr.tool.MultiCopy
au.gov.tas.dpiwe.mr.tool.MultiCount
public class MultiCount
- extends MultiCopy
This tool counts the files in multiple directories meeting the filename
specification.
- Since:
- Mr Architecture 3.0
- Version:
- 1.0.0.1
- Author:
- Kade Hansson
- See Also:
MultiEnumDir, MultiNewer, MultiCopy
|
Method Summary |
static boolean |
count(String filename)
Produce a count for a file in the specified directory. |
static void |
main(String[] argv)
Initiates the MultiCopy tool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiCount
public MultiCount()
main
public static void main(String[] argv)
throws Exception
- Initiates the MultiCopy tool.
- The switch "-single" introduces the following parameters as single
source filenames. If you don't specify a switch, "-single" is assumed.
- The switch "-multi" introduces the following parameters as directory
names, which are recursively searched for all files meeting the "-spec".
- The switch "-spec" introduces the following parameter as a
wildcarded filename specification. Only one spec is supported by this
version of the tool.
- The switch "-destination" introduces the following parameter as a
destination for copied files. Only one destination is supported by this
version of the tool.
- Parameters:
argv - arguments are filenames, directory names or switches (one of
"-destination", "-spec", -single" or "-multi").
- Throws:
IOException - if the input files could not be read or the output
files could not be written.
SecurityException - if the configured security policy is too
restrictive.
Exception - if something else goes wrong.
count
public static boolean count(String filename)
throws IOException,
SecurityException
- Produce a count for a file in the specified directory.
- Parameters:
filename - the name of the file to be counted.
- Returns:
- true if the file was successfully counted, false if the file
could not be counted.
- Throws:
IOException - if the file could not be inspected.
SecurityException - if the configured security policy is too
restrictive.