au.gov.tas.dpiwe.mr.tool
Class MultiCount

java.lang.Object
  extended by au.gov.tas.dpiwe.mr.tool.MultiCopy
      extended by 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

Field Summary
 
Fields inherited from class au.gov.tas.dpiwe.mr.tool.MultiCopy
totalCount
 
Constructor Summary
MultiCount()
           
 
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 au.gov.tas.dpiwe.mr.tool.MultiCopy
copy, copy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiCount

public MultiCount()
Method Detail

main

public static void main(String[] argv)
                 throws Exception
Initiates the MultiCopy 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.