Class PathResourceImpl

java.lang.Object
gw.internal.gosu.module.fs.PathResourceImpl
All Implemented Interfaces:
IResource, Serializable
Direct Known Subclasses:
PathDirectoryImpl, PathFileImpl

public abstract class PathResourceImpl extends Object implements IResource, Serializable
See Also:
  • Field Details

    • _path

      private Path _path
  • Constructor Details

    • PathResourceImpl

      PathResourceImpl(Path path)
  • Method Details

    • get_Path

      Path get_Path()
    • getParent

      public IDirectory getParent()
      Description copied from interface: IResource
      Gets this file's our directory's parent directory.
      Specified by:
      getParent in interface IResource
      Returns:
      this resource's parent directory
    • getName

      public String getName()
      Description copied from interface: IResource
      Gets this file's or directory's name.
      Specified by:
      getName in interface IResource
      Returns:
      this resource's name
    • delete

      public boolean delete() throws IOException
      Specified by:
      delete in interface IResource
      Throws:
      IOException
    • toURI

      public URI toURI()
      Specified by:
      toURI in interface IResource
    • getPath

      public ResourcePath getPath()
      Specified by:
      getPath in interface IResource
    • isChildOf

      public boolean isChildOf(IDirectory dir)
      Description copied from interface: IResource
      Indicates whether this resource is a direct child of the given directory.
      Specified by:
      isChildOf in interface IResource
      Parameters:
      dir - the directory which would be the parent
      Returns:
      true if this is a direct child of the given directory
    • isDescendantOf

      public boolean isDescendantOf(IDirectory dir)
      Description copied from interface: IResource
      Indicates whether this resource is a descendant of the given directory.
      Specified by:
      isDescendantOf in interface IResource
      Parameters:
      dir - the directory which would be the ancestor
      Returns:
      true if this is a descendant of the given directory
    • toJavaFile

      public File toJavaFile()
      Specified by:
      toJavaFile in interface IResource
    • isJavaFile

      public boolean isJavaFile()
      Specified by:
      isJavaFile in interface IResource
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • create

      public boolean create()
      Specified by:
      create in interface IResource
    • isInJar

      public boolean isInJar()
      Specified by:
      isInJar in interface IResource