diff options
Diffstat (limited to 'python/__init__.py')
| -rw-r--r-- | python/__init__.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/__init__.py b/python/__init__.py index 59549b85..77c64fce 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -461,6 +461,19 @@ def connect_vscode_debugger(port=5678): debugpy.wait_for_client() execute_on_main_thread(lambda: debugpy.debug_this_thread()) +def get_system_cache_directory() -> Optional[str]: + """ + Returns Binary Ninja's system cache directory on the system. + + Supported default locations: + + - macOS: ~/Library/Caches/Binary Ninja + - Linux: $XDG_CACHE_HOME/Binary Ninja or ~/.cache/Binary Ninja + - Windows: %LOCALAPPDATA%/Binary Ninja/cache + + :return: Returns a string containing the system cache directory, or None on failure. + """ + return core.BNGetSystemCacheDirectory() class UIPluginInHeadlessError(Exception): """ |
