public Partition( Device device, MBRPartitionEntry entry ) { this.device = device; partition_id = entry.id; partition_start = ( Int64 ) entry.start_lba * ( Int64 ) device.SectorSize; partition_length = ( Int64 ) entry.size_lba * ( Int64 ) device.SectorSize; }
public static FileSystem GetFileSystem( Device device, MBRPartitionEntry entry ) { return new Ext( device, entry ); }
private void ts_open_Click( object sender, System.EventArgs e ) { FileSelector file_selector = new FileSelector(); if ( file_selector.ShowDialog( this ) != DialogResult.OK || file_selector.Path == "" ) { return; } Device dev = new Device( file_selector.Path, file_selector.FileName, file_selector.SectorSize ); tv_dirs.Nodes.Clear(); TreeNode root_node = new TreeNode( dev.DeviceName ); tv_dirs.Nodes.Add( root_node ); List< FileSystem > filesystems = dev.GetFileSystems(); foreach ( FileSystem fs in filesystems ) { FileNode node = new FileNode( fs.GetRootDir(), true ); root_node.Nodes.Add( node ); } root_node.Expand(); }