Package gw.fs
Interface IResource
-
- All Known Subinterfaces:
IDirectory,IFile,IJarFileDirectory
- All Known Implementing Classes:
AdditionalDirectory,DelegateDirectory,IncludeModuleDirectory,JarEntryDirectoryImpl,JarEntryFileImpl,JarEntryResourceImpl,JarFileDirectoryImpl,JavaDirectoryImpl,JavaFileImpl,JavaResourceImpl,PathDirectoryImpl,PathFileImpl,PathResourceImpl,PhysicalDirectoryImpl,PhysicalFileImpl,PhysicalResourceImpl,URLFileImpl
public interface IResource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancreate()booleandelete()booleanexists()Indicates whether this resource exists.java.lang.StringgetName()Gets this file's or directory's name.IDirectorygetParent()Gets this file's our directory's parent directory.ResourcePathgetPath()booleanisChildOf(IDirectory dir)Indicates whether this resource is a direct child of the given directory.booleanisDescendantOf(IDirectory dir)Indicates whether this resource is a descendant of the given directory.booleanisInJar()booleanisJavaFile()java.io.FiletoJavaFile()java.net.URItoURI()
-
-
-
Method Detail
-
getParent
IDirectory getParent()
Gets this file's our directory's parent directory.- Returns:
- this resource's parent directory
-
getName
java.lang.String getName()
Gets this file's or directory's name.- Returns:
- this resource's name
-
exists
boolean exists()
Indicates whether this resource exists.- Returns:
- true if the resource exists
-
delete
boolean delete() throws java.io.IOException- Throws:
java.io.IOException
-
toURI
java.net.URI toURI()
-
getPath
ResourcePath getPath()
-
isChildOf
boolean isChildOf(IDirectory dir)
Indicates whether this resource is a direct child of the given directory.- Parameters:
dir- the directory which would be the parent- Returns:
- true if this is a direct child of the given directory
-
isDescendantOf
boolean isDescendantOf(IDirectory dir)
Indicates whether this resource is a descendant of the given directory.- Parameters:
dir- the directory which would be the ancestor- Returns:
- true if this is a descendant of the given directory
-
toJavaFile
java.io.File toJavaFile()
-
isJavaFile
boolean isJavaFile()
-
isInJar
boolean isInJar()
-
create
boolean create()
-
-