summaryrefslogtreecommitdiff
path: root/js/dispatch.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/dispatch.ts')
-rw-r--r--js/dispatch.ts30
1 files changed, 29 insertions, 1 deletions
diff --git a/js/dispatch.ts b/js/dispatch.ts
index 6c7551441..2416c19e2 100644
--- a/js/dispatch.ts
+++ b/js/dispatch.ts
@@ -4,7 +4,7 @@ import * as flatbuffers from "./dispatch_flatbuffers";
import * as json from "./dispatch_json";
// These consts are shared with Rust. Update with care.
-export const OP_FLATBUFFER = 44;
+export const OP_FLATBUFFER = 100;
export const OP_READ = 1;
export const OP_WRITE = 2;
export const OP_EXIT = 3;
@@ -46,6 +46,21 @@ export const OP_WORKER_GET_MESSAGE = 38;
export const OP_RUN = 39;
export const OP_RUN_STATUS = 40;
export const OP_KILL = 41;
+export const OP_CHDIR = 42;
+export const OP_MKDIR = 43;
+export const OP_CHMOD = 44;
+export const OP_CHOWN = 45;
+export const OP_REMOVE = 46;
+export const OP_COPY_FILE = 47;
+export const OP_STAT = 48;
+export const OP_READ_DIR = 49;
+export const OP_RENAME = 50;
+export const OP_LINK = 51;
+export const OP_SYMLINK = 52;
+export const OP_READ_LINK = 53;
+export const OP_TRUNCATE = 54;
+export const OP_MAKE_TEMP_DIR = 55;
+export const OP_CWD = 56;
export function asyncMsgFromRust(opId: number, ui8: Uint8Array): void {
switch (opId) {
@@ -73,6 +88,19 @@ export function asyncMsgFromRust(opId: number, ui8: Uint8Array): void {
case OP_HOST_GET_MESSAGE:
case OP_WORKER_GET_MESSAGE:
case OP_RUN_STATUS:
+ case OP_MKDIR:
+ case OP_CHMOD:
+ case OP_CHOWN:
+ case OP_REMOVE:
+ case OP_COPY_FILE:
+ case OP_STAT:
+ case OP_READ_DIR:
+ case OP_RENAME:
+ case OP_LINK:
+ case OP_SYMLINK:
+ case OP_READ_LINK:
+ case OP_TRUNCATE:
+ case OP_MAKE_TEMP_DIR:
json.asyncMsgFromRust(opId, ui8);
break;
default: