mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 12:20:20 +01:00
25 lines
550 B
TypeScript
25 lines
550 B
TypeScript
import { type FileSystemConfiguration } from "browserfs";
|
|
import { fs9pToBfs } from "contexts/fileSystem/core";
|
|
|
|
const index = fs9pToBfs();
|
|
|
|
const FileSystemConfig = (writeToMemory = false): FileSystemConfiguration => ({
|
|
fs: "MountableFileSystem",
|
|
options: {
|
|
"/": {
|
|
fs: "OverlayFS",
|
|
options: {
|
|
readable: {
|
|
fs: "HTTPRequest",
|
|
options: { index },
|
|
},
|
|
writable: {
|
|
fs: writeToMemory ? "InMemory" : "IndexedDB",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
export default FileSystemConfig;
|