1
0

fs builtin (highly experimental and potentially dangerous)

This commit is contained in:
Zef Hemel
2022-07-06 12:17:42 +02:00
parent 0388b6a2a4
commit f1a7cc1fb7
3 changed files with 121 additions and 0 deletions
+3
View File
@@ -49,6 +49,7 @@ import {
import { PlugSpacePrimitives } from "./hooks/plug_space_primitives";
import { PageNamespaceHook } from "./hooks/page_namespace";
import { readFileSync } from "fs";
import fileSystemSyscalls from "@plugos/plugos/syscalls/fs.node";
const safeFilename = /^[a-zA-Z0-9_\-\.]+$/;
@@ -115,6 +116,8 @@ export class ExpressServer {
// Register syscalls available on the server sid
this.system.registerSyscalls(["shell"], shellSyscalls(options.pagesPath));
// YOLO
this.system.registerSyscalls([], fileSystemSyscalls("/"));
this.system.registerSyscalls(
[],
pageIndexSyscalls(this.db),