summaryrefslogtreecommitdiff
path: root/os.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-27 12:49:20 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-27 12:49:20 -0400
commit4e55928063b4f3378d2e9425c551ce0288ca39a2 (patch)
tree7c7959f3aaaf11ebd6f229ec9fd36d30035597f2 /os.ts
parenta831d1e2391e67f6d6ad3284ab9858d9b8d610c1 (diff)
Add readFileSync
Diffstat (limited to 'os.ts')
-rw-r--r--os.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/os.ts b/os.ts
index 32988e224..8628edd2a 100644
--- a/os.ts
+++ b/os.ts
@@ -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;
+}