Class Partition
Partition class. Used to read and write blocks of data.
Inherited Members
Namespace: Cosmos.HAL.BlockDevice
Assembly: Cosmos.HAL2.dll
Syntax
public class Partition : BlockDevice
Constructors
| Improve this Doc View SourcePartition(BlockDevice, UInt64, UInt64)
Create new instance of the Partition class.
Declaration
public Partition(BlockDevice aHost, UInt64 aStartingSector, UInt64 aSectorCount)
Parameters
Type | Name | Description |
---|---|---|
BlockDevice | aHost | A hosting device. |
UInt64 | aStartingSector | A starting sector. |
UInt64 | aSectorCount | A sector count. |
Methods
| Improve this Doc View SourceReadBlock(UInt64, UInt64, ref Byte[])
Read block from partition.
Declaration
public override void ReadBlock(UInt64 aBlockNo, UInt64 aBlockCount, ref byte[] aData)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | aBlockNo | A block to read from. |
UInt64 | aBlockCount | A number of blocks in the partition. |
System.Byte[] | aData | A data that been read. |
Overrides
| Improve this Doc View SourceToString()
To string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | string value. |
WriteBlock(UInt64, UInt64, ref Byte[])
Write block to partition.
Declaration
public override void WriteBlock(UInt64 aBlockNo, UInt64 aBlockCount, ref byte[] aData)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | aBlockNo | A block number to write to. |
UInt64 | aBlockCount | A number of blocks in the partition. |
System.Byte[] | aData | A data to write. |