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

Method opendir

lib/internal/vfs/file_system.js:976–987  ·  view source on GitHub ↗

* Opens a directory asynchronously. * @param {string} dirPath The directory path * @param {object|Function} [options] Options or callback * @param {Function} [callback] Callback (err, dir)

(dirPath, options, callback)

Source from the content-addressed store, hash-verified

974 * @param {Function} [callback] Callback (err, dir)
975 */
976 opendir(dirPath, options, callback) {
977 if (typeof options === 'function') {
978 callback = options;
979 options = undefined;
980 }
981 try {
982 const dir = this.opendirSync(dirPath, options);
983 process.nextTick(callback, null, dir);
984 } catch (err) {
985 process.nextTick(callback, err);
986 }
987 }
988
989 // ==================== Stream Operations ====================
990

Callers 15

#readSyncRecursiveMethod · 0.80
opendirFunction · 0.80
mainFunction · 0.80
opendirFunction · 0.80
explicitCallFunction · 0.80
implicitCallFunction · 0.80
test-fs-opendir.jsFile · 0.80
doPromiseTestFunction · 0.80

Calls 1

opendirSyncMethod · 0.95

Tested by 1

testFunction · 0.64