(p: string, flag: FileFlag, mode: number, cb: BFSCallback<File>)
| 876 | } |
| 877 | |
| 878 | public createFile(p: string, flag: FileFlag, mode: number, cb: BFSCallback<File>): void { |
| 879 | const tx = this.store.beginTransaction('readwrite'), |
| 880 | data = emptyBuffer(); |
| 881 | |
| 882 | this.commitNewFile(tx, p, FileType.FILE, mode, data, (e: ApiError, newFile?: Inode): void => { |
| 883 | if (noError(e, cb)) { |
| 884 | cb(null, new AsyncKeyValueFile(this, p, flag, newFile!.toStats(), data)); |
| 885 | } |
| 886 | }); |
| 887 | } |
| 888 | |
| 889 | public openFile(p: string, flag: FileFlag, cb: BFSCallback<File>): void { |
| 890 | const tx = this.store.beginTransaction('readonly'); |
nothing calls this directly
no test coverage detected