MCPcopy Index your code
hub / github.com/nodejs/node / existsSync

Method existsSync

lib/internal/vfs/file_system.js:223–230  ·  view source on GitHub ↗

* Checks if a path exists synchronously. * @param {string} filePath The path to check * @returns {boolean}

(filePath)

Source from the content-addressed store, hash-verified

221 * @returns {boolean}
222 */
223 existsSync(filePath) {
224 try {
225 const providerPath = this.#toProviderPath(filePath);
226 return this[kProvider].existsSync(providerPath);
227 } catch {
228 return false;
229 }
230 }
231
232 /**
233 * Gets stats for a path synchronously.

Callers

nothing calls this directly

Calls 1

#toProviderPathMethod · 0.95

Tested by

no test coverage detected