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
ConstructorsConstructorDescriptionGFileLocal(File f, String path, FSRL fsrl, GFileSystem fs, GFile parent) Create new GFileLocal instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTheGFileSystemthat owns this file.getFSRL()TheFSRLof this file.longReturns 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.inthashCode()booleanReturns true if this is a directory.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.formats.gfilesystem.GFile
getListing
-
Constructor Details
-
GFileLocal
Create new GFileLocal instance.- Parameters:
f-Fileon the local filesystempath- String path (including filename) of this instancefsrl-FSRLof this instancefs-GFileSystemthat created this file.parent- Parent directory that contains this file, or null if parent is root.
-
-
Method Details
-
getFilesystem
Description copied from interface:GFileTheGFileSystemthat owns this file.- Specified by:
getFilesystemin interfaceGFile- Returns:
GFileSystemthat owns this file.
-
getFSRL
Description copied from interface:GFileTheFSRLof this file. -
getParentFile
Description copied from interface:GFileThe parent directory of this file.- Specified by:
getParentFilein interfaceGFile- Returns:
- parent
GFiledirectory of this file.
-
getPath
Description copied from interface:GFileThe path and filename of this file, relative to its owning filesystem. -
getName
Description copied from interface:GFileThe name of this file. -
isDirectory
public boolean isDirectory()Description copied from interface:GFileReturns true if this is a directory.- Specified by:
isDirectoryin interfaceGFile- Returns:
- boolean true if this file is a directory, false otherwise.
-
getLength
public long getLength()Description copied from interface:GFileReturns the length of this file, or -1 if not known. -
getLocalFile
-
toString
-
hashCode
public int hashCode() -
equals
-