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.Closeable
A handle to aGFileSystem
which allows tracking the current users of the filesystem.Instances must be
closed
when not needed anymore, and should not be shared across threads.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes this reference, releasing it from theFileSystemRefManager
.FileSystemRef
dup()
Creates a duplicate ref.void
finalize()
GFileSystem
getFilesystem()
GFileSystem
this ref points to.boolean
isClosed()
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()
GFileSystem
this ref points to.- Returns:
GFileSystem
this ref points to.
-
close
public void close()
Closes this reference, releasing it from theFileSystemRefManager
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in 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:
finalize
in classjava.lang.Object
-
-