import { IFileIO } from '../common/runtime.ts'; import { appendFileSync, readFileSync } from 'node:fs'; import { appendFile } from 'node:fs/promises'; const BunFileIO: IFileIO = { openFile: async (path: string): Promise => { const file = await Bun.file(path); return await file.text(); }, openFileSync: (path: string): string => { return readFileSync(path).toString(); }, appendFile: async function (path: string, contents: string): Promise { return await appendFile(path, contents); }, appendFileSync: function (path: string, contents: string) { return appendFileSync(path, contents); }, }; export default BunFileIO;