Package ghidra.framework.model
Class ProjectLocator
- java.lang.Object
-
- ghidra.framework.model.ProjectLocator
-
public class ProjectLocator extends java.lang.ObjectLightweight 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 booleanequals(java.lang.Object obj)booleanexists()Returns true if project storage existsjava.lang.StringgetLocation()Get the location of the project.java.io.FilegetMarkerFile()Returns the file that indicates a Ghidra project.java.lang.StringgetName()Get the name of the project identified by this project info.java.io.FilegetProjectDir()Returns the project directorystatic java.lang.StringgetProjectDirExtension()Returns the project directory file extension.static java.lang.StringgetProjectExtension()Returns the file extension suitable for creating file filters for the file chooser.java.io.FilegetProjectLockFile()Returns project lock file to prevent multiple accesses to the same project at once.java.net.URLgetURL()Returns the URL associated with this local project.inthashCode()static booleanisProjectDir(java.io.File file)Returns whether the given file is a project directory.booleanisTransient()Returns true if this project URL corresponds to a transient project (e.g., corresponds to remote Ghidra URL)java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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
-
-