public static MemoryMappedFileSystem Open(BufferStore bufferStorage)
        {
            var b = new MemoryMappedFileSystem(bufferStorage);

            b.OpenStore();
            return(b);
        }
        public static MemoryMappedFileSystem Create(BufferStore bufferStorage, string driveName)
        {
            var b = new MemoryMappedFileSystem(bufferStorage);

            b.CreateStore(driveName);
            b.OpenStore();
            return(b);
        }
        private MemoryMappedFileSystem(BufferStore buffers)
        {
            _buffers = buffers;

            _allocator = new SlabAllocator(buffers.Blocks.BlockSize, (int)buffers.Blocks.BlockCount);

            File      = new File(this);
            Directory = new Directory(this);
            Path      = new PathWrapper();
        }
Beispiel #4
0
        public void AssertThat_FileStoreOpen_OpensExistingFileStore()
        {
            var store = BufferStore.Open(_blocks);

            Assert.IsNotNull(store);
        }
Beispiel #5
0
 public void TestInitialize()
 {
     _file    = MemoryMappedFile.CreateNew(Guid.NewGuid().ToString(), 1000000);
     _blocks  = BlockStore.Create(_file);
     _buffers = BufferStore.Create(_blocks);
 }