Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Browse Node-APIshow

node_api_get_module_file_name

functionv9node_api.h

result may be an empty string if the add-on loading process fails to establish the add-on's file name during loading.

NAPI_EXTERN napi_status
node_api_get_module_file_name(node_api_basic_env env, const char** result);
  • [in] env: The environment that the API is invoked under.
  • [out] result: A URL containing the absolute path of the location from which the add-on was loaded. For a file on the local file system it will start with file://. The string is null-terminated and owned by env and must thus not be modified or freed.

result may be an empty string if the add-on loading process fails to establish the add-on's file name during loading.

View in the official Node.js documentation