Package gw.internal.gosu.module.fs
Class PathResourceImpl
- java.lang.Object
-
- gw.internal.gosu.module.fs.PathResourceImpl
-
- All Implemented Interfaces:
IResource,java.io.Serializable
- Direct Known Subclasses:
PathDirectoryImpl,PathFileImpl
public abstract class PathResourceImpl extends java.lang.Object implements IResource, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.file.Path_path
-
Constructor Summary
Constructors Constructor Description PathResourceImpl(java.nio.file.Path path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreate()booleandelete()booleanequals(java.lang.Object obj)(package private) java.nio.file.Pathget_Path()java.lang.StringgetName()Gets this file's or directory's name.IDirectorygetParent()Gets this file's our directory's parent directory.ResourcePathgetPath()inthashCode()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.lang.StringtoString()java.net.URItoURI()
-
-
-
Method Detail
-
get_Path
java.nio.file.Path get_Path()
-
getParent
public IDirectory getParent()
Description copied from interface:IResourceGets this file's our directory's parent directory.
-
getName
public java.lang.String getName()
Description copied from interface:IResourceGets this file's or directory's name.
-
delete
public boolean delete() throws java.io.IOException
-
getPath
public ResourcePath getPath()
-
isChildOf
public boolean isChildOf(IDirectory dir)
Description copied from interface:IResourceIndicates whether this resource is a direct child of the given directory.
-
isDescendantOf
public boolean isDescendantOf(IDirectory dir)
Description copied from interface:IResourceIndicates whether this resource is a descendant of the given directory.- Specified by:
isDescendantOfin interfaceIResource- Parameters:
dir- the directory which would be the ancestor- Returns:
- true if this is a descendant of the given directory
-
toJavaFile
public java.io.File toJavaFile()
- Specified by:
toJavaFilein interfaceIResource
-
isJavaFile
public boolean isJavaFile()
- Specified by:
isJavaFilein interfaceIResource
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-