MCPcopy
hub / github.com/Kong/insomnia / exists

Function exists

packages/insomnia/bin/yarn-standalone.js:59812–59820  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

59810
59811// for versions before node v0.8 when there weren't `fs.existsSync`
59812function exists(file) {
59813 try {
59814 if (fs.statSync(file).isFile()) {
59815 return true;
59816 }
59817 } catch (e) {
59818 return false;
59819 }
59820}
59821
59822
59823/***/ }),

Callers 1

yarn-standalone.jsFile · 0.85

Calls 1

isFileMethod · 0.80

Tested by

no test coverage detected