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

Method rmdirSync

src/generic/key_value_filesystem.ts:383–390  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

381 }
382
383 public rmdirSync(p: string): void {
384 // Check first if directory is empty.
385 if (this.readdirSync(p).length > 0) {
386 throw ApiError.ENOTEMPTY(p);
387 } else {
388 this.removeEntry(p, true);
389 }
390 }
391
392 public mkdirSync(p: string, mode: number): void {
393 const tx = this.store.beginTransaction('readwrite'),

Callers

nothing calls this directly

Calls 3

readdirSyncMethod · 0.95
removeEntryMethod · 0.95
ENOTEMPTYMethod · 0.80

Tested by

no test coverage detected