MCPcopy
hub / github.com/jvilk/BrowserFS / rmdir

Method rmdir

src/backend/MountableFileSystem.ts:321–330  ·  view source on GitHub ↗
(p: string, cb: BFSOneArgCallback)

Source from the content-addressed store, hash-verified

319 }
320
321 public rmdir(p: string, cb: BFSOneArgCallback): void {
322 const fsInfo = this._getFs(p);
323 if (this._containsMountPt(p)) {
324 cb(ApiError.ENOTEMPTY(p));
325 } else {
326 fsInfo.fs.rmdir(fsInfo.path, (err?) => {
327 cb(err ? this.standardizeError(err, fsInfo.path, p) : null);
328 });
329 }
330 }
331
332 /**
333 * Returns true if the given path contains a mount point.

Callers

nothing calls this directly

Calls 6

_getFsMethod · 0.95
_containsMountPtMethod · 0.95
standardizeErrorMethod · 0.95
cbFunction · 0.85
ENOTEMPTYMethod · 0.80
rmdirMethod · 0.65

Tested by

no test coverage detected