Package ghidra.formats.gfilesystem
Interface GFile
- All Known Implementing Classes:
GFileImpl
,GFileLocal
public interface GFile
Represents a file in a
filesystem
.
Only valid while the owning filesystem
object is still open and not
closed
.
-
Method Summary
Modifier and TypeMethodDescriptionTheGFileSystem
that owns this file.getFSRL()
TheFSRL
of this file.long
Returns the length of this file, or -1 if not known.Returns a listing of files in this sub-directory.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.boolean
Returns true if this is a directory.
-
Method Details
-
getFilesystem
GFileSystem getFilesystem()TheGFileSystem
that owns this file.- Returns:
GFileSystem
that owns this file.
-
getFSRL
FSRL getFSRL()TheFSRL
of this file.- Returns:
FSRL
of this file.
-
getParentFile
GFile getParentFile()The parent directory of this file.- Returns:
- parent
GFile
directory of this file.
-
getPath
String getPath()The path and filename of this file, relative to its owning filesystem.- Returns:
- path and filename of this file, relative to its owning filesystem.
-
getName
String getName()The name of this file.- Returns:
- name of this file.
-
isDirectory
boolean isDirectory()Returns true if this is a directory.- Returns:
- boolean true if this file is a directory, false otherwise.
-
getLength
long getLength()Returns the length of this file, or -1 if not known.- Returns:
- number of bytes in this file.
-
getListing
Returns a listing of files in this sub-directory.- Returns:
List
ofGFile
instances.- Throws:
IOException
- if not a directory or error when accessing files.
-