org.znerd.dir2xml
Class Dir2XML
java.lang.Object
|
+--org.znerd.dir2xml.Dir2XML
- public class Dir2XML
- extends Object
Creates an XML file that describes a certain directory.
- Version:
- $Revision: 1.6 $ $Date: 2002/06/24 12:50:42 $
- Author:
- Ernst de Haan (znerd@FreeBSD.org)
|
Method Summary |
static Document |
dir2xml(File directory)
Generates an XML document for the specified directory. |
static Document |
dir2xml(String directoryName)
Takes the directory identified by the specified name and generates an
XML document for it. |
static void |
main(String[] arguments)
Main function. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
main
public static final void main(String[] arguments)
throws IOException
- Main function. This function is called when this class is executed as a
program.
Expected is exactly one argument, being the name of the directory to
generate XML for. If more or less arguments are given, then a message is
printed.
- Parameters:
arguments - the arguments, possibly null.- Throws:
IOException - in case outputting the XML failed.
dir2xml
public static final Document dir2xml(String directoryName)
- Takes the directory identified by the specified name and generates an
XML document for it.
- Parameters:
directoryName - the name of the directory, not nullcified name and
generates an XML document for it.directoryName - the name of the directory, not null.- Returns:
- an XML document describing the specified directory, never
null. - Throws:
IllegalArgumentException - if directoryName == null.
dir2xml
public static final Document dir2xml(File directory)
- Generates an XML document for the specified directory.
- Parameters:
directoryName - the name of the directory, not nullcified name and
generates an XML document for it.directory - the directory, not null.- Returns:
- an XML document describing the specified directory, never
null. - Throws:
IllegalArgumentException - if directory == null || !directory.exists().
See http://dir2xml.sourceforge.net/.