diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-27 12:49:20 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-27 12:49:20 -0400 |
commit | 4e55928063b4f3378d2e9425c551ce0288ca39a2 (patch) | |
tree | 7c7959f3aaaf11ebd6f229ec9fd36d30035597f2 /os.ts | |
parent | a831d1e2391e67f6d6ad3284ab9858d9b8d610c1 (diff) |
Add readFileSync
Diffstat (limited to 'os.ts')
-rw-r--r-- | os.ts | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -40,3 +40,11 @@ export function codeCache( codeCacheOutputCode: outputCode }); } + +export function readFileSync(filename: string): Uint8Array { + const res = sendMsg("os", { + command: pb.Msg.Command.READ_FILE_SYNC, + readFileSyncFilename: filename + }); + return res.readFileSyncData; +} |