# process-working-directory

> ![Node CI](https://github.com/Eugeny/native-process-working-directory/workflows/Node%20CI/badge.svg)

Latest version **1.0.1** (published 2021-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install process-working-directory
pnpm add process-working-directory
yarn add process-working-directory
bun add process-working-directory
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-02-06 |
| First published | 2021-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | Eugene Pankov |
| Maintainers | eugenepankov |

## Links

- npm: https://www.npmjs.com/package/process-working-directory
- Repository: https://github.com/Eugeny/process-working-directory
- Issues: https://github.com/Eugeny/process-working-directory/issues
- npm.io page: https://npm.io/package/process-working-directory

## Dependencies (1)

- [node-addon-api](https://npm.io/package/node-addon-api.md) ^3.1.0

## Recent versions

- 1.0.1 (latest) — 2021-02-06
- 1.0.0 — 2021-02-06

## README

# native-process-working-directory
![Node CI](https://github.com/Eugeny/native-process-working-directory/workflows/Node%20CI/badge.svg)

Gets another process' working directory, natively, without parsing `lsof` output or whatnot.

```ts
export function getWorkingDirectoryFromPID (pid: number): string|null

// Windows only
export function getWorkingDirectoryFromHandle (handle: number): string|null
```

Note: `getWorkingDirectoryFromPID()` on Windows might require administrator privileges, use `getWorkingDirectoryFromHandle()` if you own the process.

---
_Source: https://npm.io/package/process-working-directory · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
