1.0.1 • Published 3 years ago

process-working-directory v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

native-process-working-directory

Node CI

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

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.