info.informatica.io
Class Dir

java.lang.Object
  extended by 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.05
Author:
amengual at informatica dot info

Constructor Summary
Dir()
           
 
Method Summary
static String baseName(String path)
          Gets the basename of the path.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dir

public Dir()
Method Detail

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