Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions binaryninjaapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -3694,6 +3694,7 @@ namespace BinaryNinja {
std::string GetId() const;
bool IsOpen() const;
std::string GetPath() const;
std::string GetFilePathInProject(const Ref<ProjectFile>& file) const;
std::string GetName() const;
void SetName(const std::string& name);
std::string GetDescription() const;
Expand Down
3 changes: 2 additions & 1 deletion binaryninjacore.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// Current ABI version for linking to the core. This is incremented any time
// there are changes to the API that affect linking, including new functions,
// new types, or modifications to existing functions or types.
#define BN_CURRENT_CORE_ABI_VERSION 128
#define BN_CURRENT_CORE_ABI_VERSION 129

// Minimum ABI version that is supported for loading of plugins. Plugins that
// are linked to an ABI version less than this will not be able to load and
Expand Down Expand Up @@ -4039,6 +4039,7 @@ extern "C"
BINARYNINJACOREAPI char* BNProjectGetId(BNProject* project);
BINARYNINJACOREAPI bool BNProjectIsOpen(BNProject* project);
BINARYNINJACOREAPI char* BNProjectGetPath(BNProject* project);
BINARYNINJACOREAPI char* BNProjectGetFilePathInProject(BNProject* project, BNProjectFile* file);
BINARYNINJACOREAPI char* BNProjectGetName(BNProject* project);
BINARYNINJACOREAPI void BNProjectSetName(BNProject* project, const char* name);
BINARYNINJACOREAPI char* BNProjectGetDescription(BNProject* project);
Expand Down
9 changes: 9 additions & 0 deletions project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,15 @@ std::string Project::GetPath() const
return result;
}

std::string Project::GetFilePathInProject(const Ref<ProjectFile>& file) const
{
char* path = BNProjectGetFilePathInProject(m_object, file->m_object);
std::string result = path;
BNFreeString(path);
return result;
}



std::string Project::GetName() const
{
Expand Down