(
path: string,
data: string | Buffer,
options?: { encoding?: BufferEncoding; mode?: number } | BufferEncoding,
)
| 407 | } |
| 408 | |
| 409 | writeFileSync( |
| 410 | path: string, |
| 411 | data: string | Buffer, |
| 412 | options?: { encoding?: BufferEncoding; mode?: number } | BufferEncoding, |
| 413 | ): void { |
| 414 | const mode = typeof options === "string" ? undefined : options?.mode; |
| 415 | const bytes = |
| 416 | typeof data === "string" |
| 417 | ? new TextEncoder().encode(data) |
| 418 | : new Uint8Array(data.buffer, data.byteOffset, data.byteLength); |
| 419 | writeFileSyncImpl(this.db, path, bytes, { mode }, this.now); |
| 420 | } |
| 421 | |
| 422 | writeFileRangesSync( |
| 423 | path: string, |
no outgoing calls