diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-28 14:39:02 -0400 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-28 14:39:02 -0400 |
| commit | 46117017c4b2b7024da27150e0eda1408a819750 (patch) | |
| tree | 5c40dea7d3651ecfb77365d74894c578f0f9781d /os.ts | |
| parent | bce0ecbdb8af0d6f5c089c7f2139b58ff2f60624 (diff) | |
Add writeFileSync
Diffstat (limited to 'os.ts')
| -rw-r--r-- | os.ts | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -48,3 +48,16 @@ export function readFileSync(filename: string): Uint8Array { }); return res.readFileSyncData; } + +export function writeFileSync( + filename: string, + data: Uint8Array, + perm: number +): void { + sendMsg("os", { + command: pb.Msg.Command.WRITE_FILE_SYNC, + writeFileSyncFilename: filename, + writeFileSyncData: data, + writeFileSyncPerm: perm + }); +} |
