diff --git a/src/rt/shell/fs/core.ts b/src/rt/shell/fs/core.ts index f00a7a1..0167bff 100644 --- a/src/rt/shell/fs/core.ts +++ b/src/rt/shell/fs/core.ts @@ -11,22 +11,6 @@ const enum Permissions { type FsEntry = Entry<{}> type FsDirectory = Entry -const user = [ - Entry("about_me.txt", "about me inside", Permissions.rw), - Entry("services.txt", "services inside", Permissions.rw), - Entry("hi", [], Permissions.rw) -] -const home = [ - Entry("user", user, Permissions.rw) -] -const root = [ - Entry("home", home, Permissions.r), - Entry("bin", {}, Permissions.r), -] -const fs = [ - Entry("/", root, Permissions.r) -] - type File = string interface Entry { readonly inner?: T, @@ -44,7 +28,6 @@ function Entry(name: string, inner: T, permissions: Permissions): Entr } export { - fs, type FsDirectory, type FsEntry, EntryType, diff --git a/src/rt/shell/fs/tree.ts b/src/rt/shell/fs/tree.ts new file mode 100644 index 0000000..71183c7 --- /dev/null +++ b/src/rt/shell/fs/tree.ts @@ -0,0 +1,19 @@ +import { Entry, Permissions } from "./core" + +const user = [ + Entry("about_me.txt", "about me inside", Permissions.rw), + Entry("services.txt", "services inside", Permissions.rw), + Entry("hi", [], Permissions.rw) +] +const home = [ + Entry("user", user, Permissions.rw) +] +const root = [ + Entry("home", home, Permissions.r), + Entry("bin", {}, Permissions.r), +] +const fstree = [ + Entry("/", root, Permissions.r) +] + +export default fstree \ No newline at end of file