Interface IIResource

All Known Subinterfaces:
IIDirectory, IIFile
All Known Implementing Classes:
EclipseIFile, EclipseIFolder, EclipseIPathDirectory, EclipseIPathFile, EclipseIProject, JavaDirectory, JavaFile

public interface IIResource
The interface to an interface of a resource (file or directory). The file is either a plain Java File or an Eclipse IFile, IFolder or IPath.
Author:
Christopher Mindus
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    equals(IIResource resource)
    Compares two resources.
    getFile(Object monitor)
    Get the Java canonical File.
    Gets the full path to the resource.
    Gets the name of the resource.
    boolean
    Checks if this resource is a directory.
  • Method Details

    • getName

      String getName()
      Gets the name of the resource.
      Returns:
      The name of the resource (also includes the file extension).
    • getFullPath

      String getFullPath() throws IOException
      Gets the full path to the resource.
      Throws:
      IOException - For I/O errors.
    • getFile

      File getFile(Object monitor) throws IOException
      Get the Java canonical File.
      Parameters:
      monitor - The IProgressMonitor, null for none.
      Returns:
      a File in canonical form.
      Throws:
      IOException - For I/O errors.
    • isDirectory

      boolean isDirectory()
      Checks if this resource is a directory.
    • equals

      default boolean equals(IIResource resource)
      Compares two resources.
      Parameters:
      resource - The resource to compare to.
      Returns:
      true if file names are equal.