FileDocCategorySizeDatePackage
FileHandler.javaAPI DocAzureus 3.0.3.43579Fri Mar 12 11:00:20 GMT 2004org.pf.file

FileHandler

public interface FileHandler
This interface must be implemented by classes, that want to use the generic services of FileWalker.
It defines callback methods, that are invoked by a FileWalker instance, when it is 'walking' through a directory(-tree).
see
FileWalker
author
Manfred Duchrow
version
1.0

Fields Summary
Constructors Summary
Methods Summary
public booleandirectoryEnd(java.io.File dir)
This method is called for each directory, that a FileWalker finished to walk through. It must return true, if the FileWalker should continue. To stop the calling FileWalker it can return false.

param
dir The directory, the FileWalker has finished to walk through
return
true to continue, false to terminate processing of files

public booleandirectoryStart(java.io.File dir, int count)
This method is called for each directory, that a FileWalker starts to walk through. It must return true, if the FileWalker should continue. To stop the calling FileWalker it can return false.

param
dir The directory, the FileWalker is starting to walk through
param
count The number of files and directories the FileWalker found in the directory
return
true to continue, false to terminate processing of files

public booleanhandleException(java.lang.Exception ex, java.io.File file)
This method is called for whenever an exception occurs in walking through the directories.
The method must return true, if the FileWalker should continue. To stop the calling FileWalker it can return false.

param
ex The exception to handle
param
The file, currently found by the FileWalker instance
return
true to continue, false to terminate processing of files

public booleanhandleFile(java.io.File file)
This method is called for each file, that a FileWalker instance finds. It must return true, if the FileWalker should continue. To stop the calling FileWalker it can return false.

param
The file, currently found by the FileWalker instance
return
true to continue, false to terminate processing of files