This documentation is part of the Link Checker Library project.

de.tw.website.linkchecker.util
Class FileUtil

java.lang.Object
  |
  +--de.tw.website.linkchecker.util.FileUtil

public class FileUtil
extends java.lang.Object

File Utilities.

Version:
1.0
Author:
Thomas Weinbrenner

Inner Class Summary
static class FileUtil.DirectoryNotFoundException
          Exception which is thrown if a directory is not found.
static interface FileUtil.FileNotifier
          Notifications about files.
 
Constructor Summary
FileUtil()
           
 
Method Summary
static boolean scanFileSystem(java.lang.String directory, FileUtil.FileNotifier notifier)
          Scans a complete directory tree and notifies the given interface about every file or directory found.
static java.lang.String stripFileName(java.lang.String fileName)
          Returns the path of a file.
static java.lang.String stripPath(java.lang.String fileName)
          Returns the file name of a complete path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

scanFileSystem

public static boolean scanFileSystem(java.lang.String directory,
                                     FileUtil.FileNotifier notifier)
                              throws FileUtil.DirectoryNotFoundException
Scans a complete directory tree and notifies the given interface about every file or directory found.
Parameters:
directory - The topmost directory to scan.
notifier - The file/directory notification interface.

stripFileName

public static java.lang.String stripFileName(java.lang.String fileName)
Returns the path of a file.

stripPath

public static java.lang.String stripPath(java.lang.String fileName)
Returns the file name of a complete path.

This documentation is part of the Link Checker Library project.