{"_id":"pid-cwd","_rev":"6-8e9417a51fc5a980df2c9fd45d64c509","name":"pid-cwd","description":"Get working directory of process by PID - cross platform","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"pid-cwd","version":"1.0.0","description":"Get working directory of process by PID - cross platform","main":"lib/index.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/chipto/pid-cwd.git"},"keywords":["pid","process","cwd","wd","current","working","directory","cross","platfrom"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@chipto.io"},"license":"MIT","bugs":{"url":"https://github.com/chipto/pid-cwd/issues"},"homepage":"https://github.com/chipto/pid-cwd#readme","gitHead":"9e904ac2b00f8d8d946548711428f0c06acb9a19","_id":"pid-cwd@1.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"dist":{"integrity":"sha512-Guv45lL/ViTcQkRY1PsqJzmDRlhwEYNKwSrF30AHvbnZy2UweSVqIty2+ocvecD1CS0yUSFRcibJHbtdaGCPtw==","shasum":"d6b269ec0dfd207d8b88cad603c244aab1a8e5e5","tarball":"https://registry.npmjs.org/pid-cwd/-/pid-cwd-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB01n3xaU4eM1QRXwoizb7m+mvmVKe1WKS1bb5NDNVRHAiBS266KWyqf/Evyn+9483tRCGq5aw/O4a4mN+EozHtLLQ=="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pid-cwd-1.0.0.tgz_1511513677622_0.8611363396048546"},"directories":{}},"1.0.1":{"name":"pid-cwd","version":"1.0.1","description":"Get working directory of process by PID - cross platform","main":"lib/index.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/chipto/pid-cwd.git"},"keywords":["pid","process","cwd","wd","current","working","directory","cross","platfrom"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@chipto.io"},"license":"MIT","bugs":{"url":"https://github.com/chipto/pid-cwd/issues"},"homepage":"https://github.com/chipto/pid-cwd#readme","gitHead":"6cb6406d71634f6a2ea7d0a57d0e78c0ccead4f6","_id":"pid-cwd@1.0.1","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"dist":{"integrity":"sha512-V/KRxnCgMdTWNP60SGhrlV8Ag/B9V9vSkvDLOaxrvodWNO0UAxZAM2so/ddBCRS5yel/HHbhc1zzNSAgZ4eAjA==","shasum":"b11cc11b0b34d5407923f6077d881e2b2d4bf831","tarball":"https://registry.npmjs.org/pid-cwd/-/pid-cwd-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCekBWSJL/ptlCman4XiepturQEWBA6Iw8/HfMsKmXhyAIhAJQi4DbENyGN0pzN049e7NOWoM9cBRlBQCLYeYrTgKdP"}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pid-cwd-1.0.1.tgz_1511514129147_0.6801272938027978"},"directories":{}},"1.0.2":{"name":"pid-cwd","version":"1.0.2","description":"Get working directory of process by PID - cross platform","main":"lib/index.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/chipto/pid-cwd.git"},"keywords":["pid","process","cwd","wd","current","working","directory","cross","platfrom"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@chipto.io"},"license":"MIT","bugs":{"url":"https://github.com/chipto/pid-cwd/issues"},"homepage":"https://github.com/chipto/pid-cwd#readme","gitHead":"746fd48d71cdd36b09e0c3e2717af2afb47b3231","_id":"pid-cwd@1.0.2","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"dist":{"integrity":"sha512-gW5ZR5vmkJme0NsVhP3FQZmyAp06+tEUCbTLEnXDkERP1IylKkhCTcgn0Uc5rYdeQc1FK5g2loz/YR2CatL4oA==","shasum":"e72ab502a6ada9e1825074c603aaa9825ed0952d","tarball":"https://registry.npmjs.org/pid-cwd/-/pid-cwd-1.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEJC7BOI88CNw+x51Dyg2Lup2BlrrBpdgGICDSfC9CWAiEA3DgTH72ogc3YxjUq9HUZS0GWhHM6h64cY3EciRzswO4="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pid-cwd-1.0.2.tgz_1511517643740_0.39740563929080963"},"directories":{}},"1.1.0":{"name":"pid-cwd","version":"1.1.0","description":"Get working directory of process by PID - cross platform","main":"lib/index.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/chipto/pid-cwd.git"},"keywords":["pid","process","cwd","wd","current","working","directory","cross","platfrom"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@chipto.io"},"license":"MIT","bugs":{"url":"https://github.com/chipto/pid-cwd/issues"},"homepage":"https://github.com/chipto/pid-cwd#readme","gitHead":"ba3d086581749086cf03531b587ea8292eda1a95","_id":"pid-cwd@1.1.0","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"dist":{"integrity":"sha512-aXNsBE6MIJhhI+3xA6YW5/4sHHWIVnfqsPFUSAhe/swioSF5BDIWG9eiFOt9ESHvzLHASaV7ZLwMsOCUFBlJjw==","shasum":"afd562d56930688453ada75d4adebbc223178314","tarball":"https://registry.npmjs.org/pid-cwd/-/pid-cwd-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEEkPNcXUSoKyNNKLTIfQ5VEEcqE1euP9KvoE7qbWIVUAiBX8L6HZYXvsNStQffawGpfTmsRxuPAOz8zPU+pBQGGKA=="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pid-cwd-1.1.0.tgz_1511587906391_0.6898282722104341"},"directories":{}},"1.1.1":{"name":"pid-cwd","version":"1.1.1","description":"Get working directory of process by PID - cross platform","main":"lib/index.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/NeekSandhu/pid-cwd.git"},"keywords":["pid","process","cwd","wd","current","working","directory","cross","platfrom"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/NeekSandhu/pid-cwd/issues"},"homepage":"https://github.com/NeekSandhu/pid-cwd#readme","gitHead":"bfc42a99d898a3b348e0f382713c3e8066fd82f0","_id":"pid-cwd@1.1.1","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"dist":{"integrity":"sha512-cdIXKtoyjiVrMdz6j1bnqNME0L/e3wYZNZwnSTbcDqdZtky0AFh3YOky6KT7KXBgLmnm6K2LFF3zwOFjD6uvYw==","shasum":"058e12a8ce6ab7a07e194e174b7f1b805e46bc8e","tarball":"https://registry.npmjs.org/pid-cwd/-/pid-cwd-1.1.1.tgz","fileCount":14,"unpackedSize":39397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbOD09CRA9TVsSAnZWagAAt2IQAIBOGi0raHgDY+bhZ7Jn\nfymIIXuW1WJkDjkhaq6iVJolYTGkUmSsTfTCfkYNdg/7srGikR5MPE5M/pBw\nGQSsHz/UfSkHqJdx3MrTnxdfZf7ZP8S8PI7ECz3k3XHJOgkAr03rpJNgaELw\nXfhoKhJReqLIm8TEun0IMxIObDs0RqbuXQD52uPhsZjlsC1czD/Fl21ZoR7/\nNp2S2Qm58VNMcjVzftRpqn0JkmPPlqKEo94js0Ms/gsDFZ6gkbJ3wKAC5fzz\nt9PEjlqjccAEmTHQN6VN8jyZnPkAsojfDoo3/2jUeKl7JNV6OyvLpU6ev3+c\nT6A+sABduTlHbp+sHEoPlsdT2UEFw3RPsJ5zLmhKo+amJ9iySalE5bzN8ay2\ny4pKuRN8pzoFkCRFmz4Phs1Ej9QKclXBSj5H84gEjNDBcFgiwMtxBAALfJCj\nHImKdVTdvXDiXvlh1gleC+2+OA2ft2nrFS37npNj/c0n2MMB5gwZGOFFIzCK\nU2qwG057cnnC/s198ufyhkUJ+VNkG99aYB0mFgyqTVAjisZsvfiNH19mwLS0\npJnc4soTf+Sw9/JJQ0gCkcrx3YNT5VklXzIwJUKQwyUXifdS3pO/b9psTTtS\nOIhxY5Niw8poSjAZHUna7aAQc4fQI7yQAtmkojGPcmJe6sE612Ib7Fojh2IS\nJj/2\r\n=OKOs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/d6DLQxA1SBcwhaKO/y7lbWqtxD41Rp6FvifDQxm+HQIhAIYHhLYaTtBm42Tm7TAO3ycizlgEFsZJUUHdjUCooAcB"}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pid-cwd_1.1.1_1530412349099_0.22087900714584152"},"_hasShrinkwrap":false},"1.2.0":{"name":"pid-cwd","version":"1.2.0","description":"Get working directory of process by PID - cross platform","main":"lib/index.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/NeekSandhu/pid-cwd.git"},"keywords":["pid","process","cwd","wd","current","working","directory","cross","platfrom"],"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/NeekSandhu/pid-cwd/issues"},"homepage":"https://github.com/NeekSandhu/pid-cwd#readme","gitHead":"2343dfd7aa78166cc4f99b784a79a83dba6f416f","_id":"pid-cwd@1.2.0","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-8QQzIdBmy4bd2l1NKWON1X8flO5TQQRzU2uRDua/XaxSC0iJ+rgbDrlX76t0W3DaJ7OevTYpftyvQ6oMe3hclQ==","shasum":"c14c03d812b1d23f97aee27767957fc16272c979","tarball":"https://registry.npmjs.org/pid-cwd/-/pid-cwd-1.2.0.tgz","fileCount":14,"unpackedSize":39429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqwRoCRA9TVsSAnZWagAA6p4P/j83xeCXA9JRppV1GWGf\nSnso6Xlb9GaoTpkEBGrCGez8FqWNjH/mi8ztcKQDmcyEdnPOntv8bSp5K6kd\nO7BzxUQQwJrN678AAt1auJQPC1OF/5HBDC4zCgslNHqlZ11RPPapmysvIKr7\n45aH4zJxsb1hzty6wzCU9Qp+/5oDtstCY2zHhwAMWJko7m3OnMl02AV6UkzW\nKHc/ZHTEYMlz9eHOFPRpIPl2c8pDkTUJkrbw4ZkoqDUpq/ikAg56+/yzWXJq\nF0YtyTCvAZG3xMVD301Osz/G6nqtAyNlJLYuIx4+aPQ76QXj08JXViHF0Qw6\nrpU4uSYp+6ukbvAlQPXiYneiiRzeV/FLTOaSqq4WC2+osE9ajqY9BNTZ+yiV\n5za5U61qwO3FnSiht3DYqsjsYC2pmWelu1qh8mvSoSBYXEcowmfb81bEh8l+\nDQ5wbCMd12t9f9lj+juFOraE5adjISjvaQVZfvsMZojVvPj1S45C3A/J4szx\nVxWz60d5PjcadMt4dMS+E8UKTJJAGC8Uvh0o4UR2lkoSPe/A3wQzNFy9s2ln\n/Ram/9bBdiUd8JuklhY0lNauptqK0W4yYnjTAQT9LbAeIAIkWEv2tvLxb+7d\nC3O2eRA96WB9efbs3JRTobLZ/woY8QZnaQoSeVElVimUNXARd37xNKaOIWlX\nf2Y8\r\n=/cdW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICg0xC4z27WJ/R4yUx4ESIj6bP5Rl6+YRIDy+PiXLVAAAiBA2mrx1Q/Ut1WDH+uoXdEQ2d18nC1EBMlj2A+s/vZm2A=="}]},"maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"_npmUser":{"name":"sweetslush","email":"yo@chipto.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pid-cwd_1.2.0_1554711655996_0.38156892990842795"},"_hasShrinkwrap":false}},"readme":"# pid-cwd\n\nNode lib to get the current working directory of given process id - cross platform*\n \n## Usage\n\n### Install\n\n```bash\n$ npm i pid-cwd\n```\n\n### Use\n\n```javascript\nconst pidCwd = require('pid-cwd');\n\npidCwd(54671)\n    .then(cwd => {\n        // A check is recommended, cwd could be null sometimes (read note below)\n        console.log(cwd); // > /home/chipto/Dropbox\n    });\n\n```\n\n## Note\n\n`pid-cwd` will simply return `null` if process doesn't exist, or process is owned by root/administrator or is unreachable or any other reason.<br>\nIt won't throw any `EPERM` error or anything like that. It does throw if it can't recognize the OS or given `pid` is not a positive number.\n\n\\* Works as long as `process.platform` === `win32`, `linux` or `darwin`. <br>\n&nbsp;&nbsp;&nbsp;Throws if it's not one of those, in that case `require` manually from `pid-cwd/lib/$1` where `$1` is `win`, `linux` or `macos`\n\n## External Licenses\n\nMassive thanks to  Giampaolo Rodola' and contributors, for their amazing work on [psutil](https://github.com/giampaolo/psutil)\n\n`lib/win_pwdx/` contains 99.97% of code borrowed from [`psutil/arch/windows/process_info.c`](https://github.com/giampaolo/psutil/blob/master/psutil/arch/windows/process_info.c)\n\n`psutil` is BSD licensed, see [`psutil/LICENSE`](https://github.com/giampaolo/psutil/blob/master/LICENSE) for more information.\n","maintainers":[{"name":"sweetslush","email":"yo@chipto.io"}],"time":{"modified":"2022-05-12T22:30:40.418Z","created":"2017-11-24T08:54:37.839Z","1.0.0":"2017-11-24T08:54:37.839Z","1.0.1":"2017-11-24T09:02:09.424Z","1.0.2":"2017-11-24T10:00:44.129Z","1.1.0":"2017-11-25T05:31:46.499Z","1.1.1":"2018-07-01T02:32:29.212Z","1.2.0":"2019-04-08T08:20:56.171Z"},"homepage":"https://github.com/NeekSandhu/pid-cwd#readme","keywords":["pid","process","cwd","wd","current","working","directory","cross","platfrom"],"repository":{"type":"git","url":"git+https://github.com/NeekSandhu/pid-cwd.git"},"author":{"name":"Neek Sandhu","email":"neek.sandhu@outlook.com"},"bugs":{"url":"https://github.com/NeekSandhu/pid-cwd/issues"},"license":"MIT","readmeFilename":"README.md"}