https://github.com/eugeny/native-process-working-directory
https://github.com/eugeny/native-process-working-directory
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eugeny/native-process-working-directory
- Owner: Eugeny
- Created: 2021-02-06T10:55:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T02:53:16.000Z (over 2 years ago)
- Last Synced: 2025-02-05T02:54:28.368Z (3 months ago)
- Language: C++
- Size: 122 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# native-process-working-directory
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.