{"_id":"path-exists","_rev":"523654","name":"path-exists","description":"Check if a path exists","dist-tags":{"latest":"5.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-08-12T10:45:46.000Z","created":"2015-05-02T22:43:43.950Z","5.0.0":"2021-08-12T10:43:19.346Z","4.0.0":"2019-04-04T03:29:16.887Z","3.0.0":"2016-05-01T11:44:53.762Z","2.1.0":"2015-11-14T13:55:22.456Z","2.0.0":"2015-09-01T07:09:33.519Z","1.0.0":"2015-05-02T22:43:43.950Z"},"users":{"redmonkeydf":true,"timdp":true,"recursion_excursion":true,"banzeh":true,"monjer":true,"antixrist":true,"deneboulton":true,"hyteer":true,"rocket0191":true,"ognjen.jevremovic":true,"serge-nikitin":true,"coinoperatedgoi":true,"kiinlam":true,"ash":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-exists.git"},"versions":{"5.0.0":{"name":"path-exists","version":"5.0.0","description":"Check if a path exists","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-exists.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["path","exists","exist","file","filepath","fs","filesystem","file-system","access","stat"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.17.0","xo":"^0.44.0"},"gitHead":"7c95f5c1f5f811c7f4dac78ab5b9e258491f03af","bugs":{"url":"https://github.com/sindresorhus/path-exists/issues"},"homepage":"https://github.com/sindresorhus/path-exists#readme","_id":"path-exists@5.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.10.0","dist":{"shasum":"a6aad9489200b21fab31e49cf09277e5116fb9e7","size":2090,"noattachment":false,"key":"/path-exists/-/path-exists-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-exists/download/path-exists-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/path-exists_5.0.0_1628764999208_0.25633467024338685"},"_hasShrinkwrap":false,"publish_time":1628764999346,"_cnpm_publish_time":1628764999346},"4.0.0":{"name":"path-exists","version":"4.0.0","description":"Check if a path exists","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-exists.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["path","exists","exist","file","filepath","fs","filesystem","file-system","access","stat"],"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"26b1adf80aa6761a7db35927a20cf59e0fd1a00d","bugs":{"url":"https://github.com/sindresorhus/path-exists/issues"},"homepage":"https://github.com/sindresorhus/path-exists#readme","_id":"path-exists@4.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"513bdbe2d3b95d7762e8c1137efa195c6c61b5b3","size":2073,"noattachment":false,"key":"/path-exists/-/path-exists-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-exists/download/path-exists-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/path-exists_4.0.0_1554348556736_0.4131618583175338"},"_hasShrinkwrap":false,"publish_time":1554348556887,"_cnpm_publish_time":1554348556887},"3.0.0":{"name":"path-exists","version":"3.0.0","description":"Check if a path exists","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/path-exists.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["path","exists","exist","file","filepath","fs","filesystem","file-system","access","stat"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"4696c60a8b2b9ac61902aa9eab7cb326ab6005c8","bugs":{"url":"https://github.com/sindresorhus/path-exists/issues"},"homepage":"https://github.com/sindresorhus/path-exists#readme","_id":"path-exists@3.0.0","_shasum":"ce0ebeaa5f78cb18925ea7d810d7b59b010fd515","_from":".","_npmVersion":"3.8.9","_nodeVersion":"4.4.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"ce0ebeaa5f78cb18925ea7d810d7b59b010fd515","size":1891,"noattachment":false,"key":"/path-exists/-/path-exists-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-exists/download/path-exists-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/path-exists-3.0.0.tgz_1462103091696_0.5805528531782329"},"directories":{},"publish_time":1462103093762,"_cnpm_publish_time":1462103093762,"_hasShrinkwrap":false},"2.1.0":{"name":"path-exists","version":"2.1.0","description":"Check if a path exists","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/path-exists"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["path","exists","exist","file","filepath","fs","filesystem","file-system","access","stat"],"dependencies":{"pinkie-promise":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"3af423661e78466764f87c5712263c5d7a1ce5b7","bugs":{"url":"https://github.com/sindresorhus/path-exists/issues"},"homepage":"https://github.com/sindresorhus/path-exists","_id":"path-exists@2.1.0","_shasum":"0feb6c64f0fc518d9a754dd5efb62c7022761f4b","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0feb6c64f0fc518d9a754dd5efb62c7022761f4b","size":1922,"noattachment":false,"key":"/path-exists/-/path-exists-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-exists/download/path-exists-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1447509322456,"_cnpm_publish_time":1447509322456,"_hasShrinkwrap":false},"2.0.0":{"name":"path-exists","version":"2.0.0","description":"Check if a path exists","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/path-exists"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["path","exists","exist","file","filepath","fs","filesystem","file-system","access","stat"],"dependencies":{"pinkie-promise":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"a8d30de3a24e7d71ae2c30a057525e603205447d","bugs":{"url":"https://github.com/sindresorhus/path-exists/issues"},"homepage":"https://github.com/sindresorhus/path-exists","_id":"path-exists@2.0.0","_shasum":"c4efe37d7fdc792f9a029ce7906e095e169f9be1","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c4efe37d7fdc792f9a029ce7906e095e169f9be1","size":1916,"noattachment":false,"key":"/path-exists/-/path-exists-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-exists/download/path-exists-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1441091373519,"_cnpm_publish_time":1441091373519,"_hasShrinkwrap":false},"1.0.0":{"name":"path-exists","version":"1.0.0","description":"Check if a path exists","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/path-exists"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["path","exists","exist","file","filepath","fs","filesystem","file-system","access","stat"],"devDependencies":{"ava":"0.0.4"},"gitHead":"be563ef9f750ec4fcbd5cc77603c869bdee05658","bugs":{"url":"https://github.com/sindresorhus/path-exists/issues"},"homepage":"https://github.com/sindresorhus/path-exists","_id":"path-exists@1.0.0","_shasum":"d5a8998eb71ef37a74c34eb0d9eba6e878eea081","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d5a8998eb71ef37a74c34eb0d9eba6e878eea081","size":1895,"noattachment":false,"key":"/path-exists/-/path-exists-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-exists/download/path-exists-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1430606623950,"_cnpm_publish_time":1430606623950,"_hasShrinkwrap":false}},"readme":"# path-exists\n\n> Check if a path exists\n\nNOTE: `fs.existsSync` has been un-deprecated in Node.js since 6.8.0. If you only need to check synchronously, this module is not needed.\n\nNever use this before handling a file though:\n\n> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there.\n\n## Install\n\n```\n$ npm install path-exists\n```\n\n## Usage\n\n```js\n// foo.js\nimport {pathExists} from 'path-exists';\n\nconsole.log(await pathExists('foo.js'));\n//=> true\n```\n\n## API\n\n### pathExists(path)\n\nReturns a `Promise<boolean>` of whether the path exists.\n\n### pathExistsSync(path)\n\nReturns a `boolean` of whether the path exists.\n\n## Related\n\n- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module\n- [path-type](https://github.com/sindresorhus/path-type) - Check if a path exists and whether it's a file, directory, or symlink\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-path-exists?utm_source=npm-path-exists&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","_attachments":{},"homepage":"https://github.com/sindresorhus/path-exists#readme","bugs":{"url":"https://github.com/sindresorhus/path-exists/issues"},"license":"MIT"}