Package ghidra.formats.gfilesystem

# Class RefdFile

java.lang.Object
ghidra.formats.gfilesystem.RefdFile

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class RefdFile extends Object implements Closeable
A `GFile` along with a `FileSystemRef` to keep the filesystem pinned in memory.

The caller is responsible for `closing` this object, which releases the FilesystemRef.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final GFile`
  `file`
  `final FileSystemRef`
  `fsRef`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RefdFile(FileSystemRef fsRef, GFile file)`
  Creates a RefdFile instance, taking ownership of the supplied fsRef.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### fsRef

    public final FileSystemRef fsRef

  - ### file

    public final GFile file

- ## Constructor Details

  - ### RefdFile

    public RefdFile(FileSystemRef fsRef, GFile file)
    Creates a RefdFile instance, taking ownership of the supplied fsRef.
    Parameters:
      `fsRef` - `FileSystemRef` that pins the filesystem open
      `file` - GFile file inside the specified filesystem

- ## Method Details

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Throws:
      `IOException`