Package com.iizix.app.builder
Class JavaDirectory
java.lang.Object
com.iizix.app.builder.JavaDirectory
- All Implemented Interfaces:
IIDirectory,IIResource
The Java file wrapper.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanCompares two resources.Get the Java canonical File.Gets the full path to the resource.getName()Gets the name of the resource.inthashCode()The hash code.booleanChecks if this resource is a directory.listDirectory(Object monitor) Lists the contents of the directory.toString()Resource String representation is the file name.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.iizix.app.builder.IIResource
equals
Constructor Details
JavaDirectory
Constructs a directory.- Parameters:
dir- The directory.- Throws:
IOException- For I/O errors or if file is a directory.
Method Details
getFullPath
Gets the full path to the resource.- Specified by:
getFullPathin interfaceIIResource
getFile
Get the Java canonical File.- Specified by:
getFilein interfaceIIResource- Parameters:
monitor- The IProgressMonitor, null for none.- Returns:
- a File in canonical form.
listDirectory
Lists the contents of the directory.- Specified by:
listDirectoryin interfaceIIDirectory- Parameters:
monitor- The IProgressMonitor, null for none.- Throws:
FileNotFoundException- If directory doesn't exist.IOException- For I/O errors.
isDirectory
public boolean isDirectory()Checks if this resource is a directory.- Specified by:
isDirectoryin interfaceIIResource- Returns:
- true.
getName
Gets the name of the resource.- Specified by:
getNamein interfaceIIResource- Returns:
- The name of the resource (also includes the file extension).
equals
Compares two resources.hashCode
public int hashCode()The hash code.toString
Resource String representation is the file name.