MCPcopy Create free account
hub / github.com/nodejs/node / #getEntry

Method #getEntry

lib/internal/vfs/providers/memory.js:338–347  ·  view source on GitHub ↗

* Gets an entry by path, throwing if not found. * @param {string} path The path * @param {string} syscall The syscall name for error * @param {boolean} followSymlinks Whether to follow symlinks * @returns {MemoryEntry}

(path, syscall, followSymlinks = true)

Source from the content-addressed store, hash-verified

336 * @returns {MemoryEntry}
337 */
338 #getEntry(path, syscall, followSymlinks = true) {
339 const result = this.#lookupEntry(path, followSymlinks);
340 if (result.eloop) {
341 throw createELOOP(syscall, path);
342 }
343 if (!result.entry) {
344 throw createENOENT(syscall, path);
345 }
346 return result.entry;
347 }
348
349 /**
350 * Ensures parent directories exist, optionally creating them.

Callers 13

openSyncMethod · 0.95
statSyncMethod · 0.95
lstatSyncMethod · 0.95
readdirSyncMethod · 0.95
rmdirSyncMethod · 0.95
unlinkSyncMethod · 0.95
renameSyncMethod · 0.95
linkSyncMethod · 0.95
readlinkSyncMethod · 0.95
chmodSyncMethod · 0.95
chownSyncMethod · 0.95
utimesSyncMethod · 0.95

Calls 3

#lookupEntryMethod · 0.95
createELOOPFunction · 0.85
createENOENTFunction · 0.85

Tested by

no test coverage detected