info.informatica.io
Class Dir
java.lang.Object
info.informatica.io.Dir
public final class Dir
- extends Object
Wildcard-enabled directory utility.
Mainly useful as a WildcardFilter demonstration.
Example of usage:
java -cp jclf.jar info.informatica.io.Dir "/etc/h*"
- Version:
- 1.06
- Author:
- amengual at informatica dot info
|
Constructor Summary |
Dir()
|
Dir
public Dir()
main
public static void main(String[] args)
baseName
public static String baseName(String path)
- Gets the basename of the path.
If the path corresponds to a file, returns the path to parent directory,
or null if there isn't, otherwise returns itself (as absolute path)
- Parameters:
path - the path
- Returns:
- the basename, or null if there isn't
wildcardFilter
public int wildcardFilter(String wildcardPath,
Dir.FilterListener listener)
throws FileFilteringException,
IOException
- Throws:
FileFilteringException
IOException
copyFile
public static boolean copyFile(File in,
File dest,
boolean force)
deepCopy
public static boolean deepCopy(File in,
File destDir)
deleteRecursive
public static boolean deleteRecursive(File path)