Beispiel #1
0
        public void Setup()
        {
            DebuggerFactory.WriteToConsole = true;
            var xDevice    = new TestBlockDevice();
            var xPartition = new Partition(xDevice, 0, xDevice.BlockCount);

            BlockDevice.Devices.Clear();
            Partition.Partitions.Clear();

            BlockDevice.Devices.Add(xDevice);
            Partition.Partitions.Add(xPartition);
            CosmosVFS cosmosVFS = new CosmosVFS();

            VFSManager.RegisterVFS(cosmosVFS, true);

            foreach (var disk in VFSManager.GetDisks())
            {
                foreach (var part in disk.Partitions)
                {
                    if (part.RootPath == @"0:\")
                    {
                        ourDisk = disk;
                        ourPart = part;
                        break;
                    }
                }
            }
            if (ourDisk == null)
            {
                throw new Exception("Failed to find our drive.");
            }
        }
        public void Setup()
        {
            var xDevice    = new TestBlockDevice();
            var xPartition = new Partition(xDevice, 0, xDevice.BlockCount);
            var xFactory   = new FatFileSystemFactory();

            mFS = (FatFileSystem)xFactory.Create(xPartition, "0:\\", (long)(xPartition.BlockSize * xPartition.BlockCount));
        }
Beispiel #3
0
        public void Setup()
        {
            DebuggerFactory.WriteToConsole = true;
            var xDevice    = new TestBlockDevice();
            var xPartition = new Partition(xDevice, 0, xDevice.BlockCount);

            BlockDevice.Devices.Clear();
            BlockDevice.Devices.Add(xPartition);
            VFSManager.RegisterVFS(new CosmosVFS(), true);
        }
Beispiel #4
0
        public void Setup()
        {
            DebuggerFactory.WriteToConsole = true;
            var xDevice    = new TestBlockDevice();
            var xPartition = new Partition(xDevice, 0, xDevice.BlockCount);
            var xFactory   = new FatFileSystemFactory();

            mFS  = (FatFileSystem)xFactory.Create(xPartition, "0:\\", (long)(xPartition.BlockSize * xPartition.BlockCount));
            mFat = mFS.GetFat(0);
        }