(p: string, flag: FileFlag, mode: number)
| 255 | } |
| 256 | |
| 257 | public openSync(p: string, flag: FileFlag, mode: number): EmscriptenFile { |
| 258 | try { |
| 259 | const stream = this._FS.open(p, flag.getFlagString(), mode); |
| 260 | if (this._FS.isDir(stream.node.mode)) { |
| 261 | this._FS.close(stream); |
| 262 | throw ApiError.EISDIR(p); |
| 263 | } |
| 264 | return new EmscriptenFile(this, this._FS, p, stream); |
| 265 | } catch (e) { |
| 266 | throw convertError(e, p); |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | public unlinkSync(p: string): void { |
| 271 | try { |
nothing calls this directly
no test coverage detected