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(); }
public void AssertThat_FileStoreOpen_OpensExistingFileStore() { var store = BufferStore.Open(_blocks); Assert.IsNotNull(store); }
public void TestInitialize() { _file = MemoryMappedFile.CreateNew(Guid.NewGuid().ToString(), 1000000); _blocks = BlockStore.Create(_file); _buffers = BufferStore.Create(_blocks); }