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

Method rm

lib/internal/vfs/file_system.js:863–874  ·  view source on GitHub ↗

* Removes a file or directory asynchronously. * @param {string} filePath The path to remove * @param {object|Function} [options] Options or callback * @param {Function} [callback] Callback (err)

(filePath, options, callback)

Source from the content-addressed store, hash-verified

861 * @param {Function} [callback] Callback (err)
862 */
863 rm(filePath, options, callback) {
864 if (typeof options === 'function') {
865 callback = options;
866 options = undefined;
867 }
868 try {
869 this.rmSync(filePath, options);
870 process.nextTick(callback, null);
871 } catch (err) {
872 process.nextTick(callback, err);
873 }
874 }
875
876 /**
877 * Gets file stats from a file descriptor asynchronously.

Callers 3

rmFunction · 0.45
createVfsHandlersFunction · 0.45
rmFunction · 0.45

Calls 8

rmSyncMethod · 0.95
createEISDIRFunction · 0.85
lstatMethod · 0.45
isSymbolicLinkMethod · 0.45
unlinkMethod · 0.45
isDirectoryMethod · 0.45
readdirMethod · 0.45
rmdirMethod · 0.45

Tested by

no test coverage detected