Package ghidra.formats.gfilesystem
Class FileSystemRef
- java.lang.Object
-
- ghidra.formats.gfilesystem.FileSystemRef
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class FileSystemRef extends java.lang.Object implements java.io.CloseableA handle to aGFileSystemwhich allows tracking the current users of the filesystem.Instances must be
closedwhen not needed anymore, and should not be shared across threads.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this reference, releasing it from theFileSystemRefManager.FileSystemRefdup()Creates a duplicate ref.voidfinalize()GFileSystemgetFilesystem()GFileSystemthis ref points to.booleanisClosed()Returns true if this ref wasclosed.
-
-
-
Method Detail
-
dup
public FileSystemRef dup()
Creates a duplicate ref.- Returns:
- a new duplicate
FileSystemRef
-
getFilesystem
public GFileSystem getFilesystem()
GFileSystemthis ref points to.- Returns:
GFileSystemthis ref points to.
-
close
public void close()
Closes this reference, releasing it from theFileSystemRefManager.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
isClosed
public boolean isClosed()
Returns true if this ref wasclosed.- Returns:
- boolean true if this ref was closed.
-
finalize
public void finalize()
- Overrides:
finalizein classjava.lang.Object
-
-