| 98 | } |
| 99 | |
| 100 | std::shared_ptr<Directory> WasmFS::initRootDirectory() { |
| 101 | auto rootBackend = wasmfs_create_root_dir(); |
| 102 | auto rootDirectory = |
| 103 | rootBackend->createDirectory(S_IRUGO | S_IXUGO | S_IWUGO); |
| 104 | auto lockedRoot = rootDirectory->locked(); |
| 105 | |
| 106 | // The root directory is its own parent. |
| 107 | lockedRoot.setParent(rootDirectory); |
| 108 | |
| 109 | // Set up the root directory. |
| 110 | rootBackend->populateRoot(lockedRoot); |
| 111 | |
| 112 | return rootDirectory; |
| 113 | } |
| 114 | |
| 115 | // Initialize files specified by the --preload-file option. |
| 116 | // Set up directories and files in wasmFS$preloadedDirs and |
nothing calls this directly
no test coverage detected