/// <summary> /// Creates a new file system in the given device /// </summary> public static BobFs Mkfs(BlockSource device) { BobFs fs = new BobFs(device); fs.Format(); return(fs); }
/// <summary> /// Mounts the given device. /// </summary> public static BobFs Mount(BlockSource device) { BobFs fs = new BobFs(device); fs.CheckHeader(); return(fs); }
private BobFs(BlockSource source, bool caching = true) { Source = source; _caching = caching; _tmpBuffer = new byte[BlockSize]; Source.ReadAll(0, _tmpBuffer, 0, BlockSize); _superBlock = Superblock.ReadFrom(_tmpBuffer); }