Package ghidra.formats.gfilesystem
Class GFileLocal
java.lang.Object
ghidra.formats.gfilesystem.GFileLocal
- All Implemented Interfaces:
GFile
GFile
implementation that refers to a real java.io.File on the local
file system.
This implementation keeps track of the FSRL and GFile path separately so that they can be different, as is the case with LocalFileSystemSub files that have real FSRLs but fake relative paths.
-
Constructor Summary
ConstructorDescriptionGFileLocal
(File f, String path, FSRL fsrl, GFileSystem fs, GFile parent) Create new GFileLocal instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
TheGFileSystem
that owns this file.getFSRL()
TheFSRL
of this file.long
Returns the length of this file, or -1 if not known.getName()
The name of this file.The parent directory of this file.getPath()
The path and filename of this file, relative to its owning filesystem.int
hashCode()
boolean
Returns true if this is a directory.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ghidra.formats.gfilesystem.GFile
getListing
-
Constructor Details
-
GFileLocal
Create new GFileLocal instance.- Parameters:
f
-File
on the local filesystempath
- String path (including filename) of this instancefsrl
-FSRL
of this instancefs
-GFileSystem
that created this file.parent
- Parent directory that contains this file, or null if parent is root.
-
-
Method Details
-
getFilesystem
Description copied from interface:GFile
TheGFileSystem
that owns this file.- Specified by:
getFilesystem
in interfaceGFile
- Returns:
GFileSystem
that owns this file.
-
getFSRL
Description copied from interface:GFile
TheFSRL
of this file. -
getParentFile
Description copied from interface:GFile
The parent directory of this file.- Specified by:
getParentFile
in interfaceGFile
- Returns:
- parent
GFile
directory of this file.
-
getPath
Description copied from interface:GFile
The path and filename of this file, relative to its owning filesystem. -
getName
Description copied from interface:GFile
The name of this file. -
isDirectory
public boolean isDirectory()Description copied from interface:GFile
Returns true if this is a directory.- Specified by:
isDirectory
in interfaceGFile
- Returns:
- boolean true if this file is a directory, false otherwise.
-
getLength
public long getLength()Description copied from interface:GFile
Returns the length of this file, or -1 if not known. -
getLocalFile
-
toString
-
hashCode
public int hashCode() -
equals
-