Package ghidra.framework.model
Class ProjectLocator
- java.lang.Object
-
- ghidra.framework.model.ProjectLocator
-
public class ProjectLocator extends java.lang.Object
Lightweight descriptor of a local Project storage location.
-
-
Constructor Summary
Constructors Constructor Description ProjectLocator(java.lang.String path, java.lang.String name)
Construct a project URL.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
boolean
exists()
Returns true if project storage existsjava.lang.String
getLocation()
Get the location of the project.java.io.File
getMarkerFile()
Returns the file that indicates a Ghidra project.java.lang.String
getName()
Get the name of the project identified by this project info.java.io.File
getProjectDir()
Returns the project directorystatic java.lang.String
getProjectDirExtension()
Returns the project directory file extension.static java.lang.String
getProjectExtension()
Returns the file extension suitable for creating file filters for the file chooser.java.io.File
getProjectLockFile()
Returns project lock file to prevent multiple accesses to the same project at once.java.net.URL
getURL()
Returns the URL associated with this local project.int
hashCode()
static boolean
isProjectDir(java.io.File file)
Returns whether the given file is a project directory.boolean
isTransient()
Returns true if this project URL corresponds to a transient project (e.g., corresponds to remote Ghidra URL)java.lang.String
toString()
-
-
-
Method Detail
-
isTransient
public boolean isTransient()
Returns true if this project URL corresponds to a transient project (e.g., corresponds to remote Ghidra URL)
-
getURL
public java.net.URL getURL()
Returns the URL associated with this local project. If this is a transient project, a remote repository URL will be returned.
-
getName
public java.lang.String getName()
Get the name of the project identified by this project info.
-
getLocation
public java.lang.String getLocation()
Get the location of the project.
-
getProjectDir
public java.io.File getProjectDir()
Returns the project directory
-
getMarkerFile
public java.io.File getMarkerFile()
Returns the file that indicates a Ghidra project.
-
getProjectLockFile
public java.io.File getProjectLockFile()
Returns project lock file to prevent multiple accesses to the same project at once.
-
getProjectDirExtension
public static java.lang.String getProjectDirExtension()
Returns the project directory file extension.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getProjectExtension
public static java.lang.String getProjectExtension()
Returns the file extension suitable for creating file filters for the file chooser.
-
isProjectDir
public static boolean isProjectDir(java.io.File file)
Returns whether the given file is a project directory.- Parameters:
file
- file to check- Returns:
- true if the file is a project directory
-
exists
public boolean exists()
Returns true if project storage exists
-
-