medi.io
Class DirectoryScanner

java.lang.Object
  |
  +--javatools.io.DirectoryGetter
        |
        +--medi.io.DirectoryScanner

public class DirectoryScanner
extends DirectoryGetter

It represents a class used to scan directories and to put information about files and subdirectories in a file.


Field Summary
 
Fields inherited from class javatools.io.DirectoryGetter
dirRef, fileList, subdirList
 
Constructor Summary
DirectoryScanner()
          Creates new DirectoryScanner
DirectoryScanner(java.io.File dirFile)
          Creates new DirectoryScanner
DirectoryScanner(java.lang.String path)
          Creates new DirectoryScanner
 
Method Summary
 void appendInfoToSaver(int mountPointLength)
          Appends info about the directory (and subdirectories recursively) using the previously passed volume scanning saver.
 DirectoryScanner[] getSubdirScanners()
          Returns the scanners for subdirectories as an array.
 VolumeScanningSaver getVolumeScanningSaver()
          Returns the used volume scanning saver.
 void setStatusFrame(Volume2DbStatus pStatus)
          Sets the status frame used to display the status of the process.
 void setVolumeScanningSaver(VolumeScanningSaver pVss)
          Sets the volume scanning saver.
 
Methods inherited from class javatools.io.DirectoryGetter
getFile, getFiles, getSubdirGetters, getSubdirs, scanDir, setDirectoryFile, setDirectoryPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryScanner

public DirectoryScanner()
Creates new DirectoryScanner


DirectoryScanner

public DirectoryScanner(java.io.File dirFile)
Creates new DirectoryScanner

Parameters:
dirFile - The file representing the directory to scan.

DirectoryScanner

public DirectoryScanner(java.lang.String path)
Creates new DirectoryScanner

Parameters:
path - The path of the directory to be scanned.
Method Detail

setVolumeScanningSaver

public void setVolumeScanningSaver(VolumeScanningSaver pVss)
Sets the volume scanning saver.

Parameters:
pVss - The volume scanning saver to use.

getVolumeScanningSaver

public VolumeScanningSaver getVolumeScanningSaver()
Returns the used volume scanning saver.

Returns:
The volume scanning saver.

setStatusFrame

public void setStatusFrame(Volume2DbStatus pStatus)
Sets the status frame used to display the status of the process.

Parameters:
pStatus - The status frame.

getSubdirScanners

public DirectoryScanner[] getSubdirScanners()
                                     throws java.io.IOException
Returns the scanners for subdirectories as an array.

Returns:
The directory-scanners.
Throws:
java.io.IOException - If something goes wrong.

appendInfoToSaver

public void appendInfoToSaver(int mountPointLength)
                       throws java.io.IOException
Appends info about the directory (and subdirectories recursively) using the previously passed volume scanning saver.

Parameters:
mountPointLength - The length of the mount-point-path-string.
Throws:
java.io.IOException - If something goes wrong.