Ejemplo n.º 1
0
        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)));
        }
Ejemplo n.º 2
0
        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));
            }
        }
Ejemplo n.º 3
0
        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();
            }
        }