Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Mounts the given device.
        /// </summary>
        public static BobFs Mount(BlockSource device)
        {
            BobFs fs = new BobFs(device);

            fs.CheckHeader();
            return(fs);
        }
Exemplo n.º 3
0
        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);
        }