1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 02:11:15 +02:00

C API: Add nix_store_get_storedir

This commit is contained in:
Robert Hensing 2024-12-12 17:43:01 +01:00 committed by Mic92
parent 80ee736b02
commit 472912f7ca
4 changed files with 60 additions and 2 deletions

View file

@ -93,7 +93,18 @@ void nix_store_free(Store * store);
*/
nix_err nix_store_get_uri(nix_c_context * context, Store * store, nix_get_string_callback callback, void * user_data);
// returns: owned StorePath*
/**
* @brief get the storeDir of a Nix store, typically `"/nix/store"`
* @param[out] context Optional, stores error information
* @param[in] store nix store reference
* @param[in] callback Called with the URI.
* @param[in] user_data optional, arbitrary data, passed to the callback when it's called.
* @see nix_get_string_callback
* @return error code, NIX_OK on success.
*/
nix_err
nix_store_get_storedir(nix_c_context * context, Store * store, nix_get_string_callback callback, void * user_data);
/**
* @brief Parse a Nix store path into a StorePath
*