(p: string, cb: BFSOneArgCallback)
| 910 | } |
| 911 | |
| 912 | public rmdir(p: string, cb: BFSOneArgCallback): void { |
| 913 | // Check first if directory is empty. |
| 914 | this.readdir(p, (err, files?) => { |
| 915 | if (err) { |
| 916 | cb(err); |
| 917 | } else if (files!.length > 0) { |
| 918 | cb(ApiError.ENOTEMPTY(p)); |
| 919 | } else { |
| 920 | this.removeEntry(p, true, cb); |
| 921 | } |
| 922 | }); |
| 923 | } |
| 924 | |
| 925 | public mkdir(p: string, mode: number, cb: BFSOneArgCallback): void { |
| 926 | const tx = this.store.beginTransaction('readwrite'), |
nothing calls this directly
no test coverage detected