MCPcopy Create free account
hub / github.com/play-co/devkit / exists

Function exists

src/modules/Module.js:11–24  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

9var logger = require('../util/logging').get('module');
10
11var exists = function (filePath) {
12 return new Promise(function (resolve, reject) {
13 fs.exists(filePath, function (pathExists) {
14 if (pathExists) {
15 return resolve(pathExists);
16 }
17
18 return reject({
19 code: 'ENOENT',
20 filename: filePath
21 });
22 });
23 });
24};
25
26/**
27 * A module for a game has several properties:

Callers 1

Module.jsFile · 0.85

Calls 1

rejectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…