Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-api: allow retrieval of add-on file name #37195

Closed
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update doc/api/n-api.md
Co-authored-by: Michael Dawson <mdawson@devrus.com>
  • Loading branch information
Gabriel Schulhof and mhdawson authored Feb 8, 2021
commit 77fff595ee5387accb1ab7b91668bc577459aa08
5 changes: 3 additions & 2 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5975,8 +5975,9 @@ node_api_get_module_file_name(napi_env env, const char** result);
```

* `[in] env`: The environment that the API is invoked under.
* `[out] result`: A null-terminated string containing the absolute path of the
location from which the add-on was loaded. The string is owned by `env` and
* `[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 owned by `env` and
must not be modified or freed.

`result` may be an empty string if the add-on loading process fails to establish
Expand Down