public void RebuildWorkspace() { var osPath = WorkspacePath.Root.AppendDirectory("PixelVisionOS"); if (Exists(osPath)) { Mounts.Remove(Get(osPath)); } var systemPaths = new List <IFileSystem> { new SubFileSystem(this, WorkspacePath.Root.AppendDirectory("App").AppendDirectory("PixelVisionOS")) }; // Create a path to the workspace system folder var path = WorkspacePath.Root.AppendDirectory("Workspace").AppendDirectory("System"); // Look to see if the workspace system folder exists if (Exists(path)) { // Add the workspace system folder to the os file system systemPaths.Add(new SubFileSystem(this, path)); } // Mount the PixelVisionOS directory AddMount(new KeyValuePair <WorkspacePath, IFileSystem>(osPath, new MergedFileSystem(systemPaths))); }
public void SaveActiveDisk() { if (currentDisk is ZipFileSystem disk) { disk.Save(); } // Create a new mount point for the current game var rootPath = WorkspacePath.Root.AppendDirectory("Game"); // Make sure we don't have a disk with the same name if (Exists(rootPath)) { Mounts.Remove(Get(rootPath)); } }
public void RemoveDisk(WorkspacePath path) { if (Exists(path)) { // Check to see if this is a zip SaveDisk(path); // Remove disk from the mount point Mounts.Remove(Get(path)); if (_disks.Contains(path)) { _disks.Remove(path); } // // InvalidateDisks(); } }