Class Win32DiskDriveToPartitionAndLogicalDisk
Win32DiskDrive and its associated
1:N relationships with Win32DiskPartition and Win32LogicalDisk
in a Windows system.
Each instance represents a single physical DiskDrive identified by deviceId,
and maintains a one-to-many mapping with its corresponding DiskPartitions and LogicalDisks.
Usage example
Win32DiskDriveToPartitionAndLogicalDisk diskInfo = Win32DiskDriveToPartitionAndLogicalDisk.builder()
.deviceId("\\\\.\\PHYSICALDRIVE0")
.diskDrive(drive)
.diskPartitionList(partitions)
.logicalDiskList(logicalDisks)
.build();
NOTE: While a DiskDrive has 1:N relationship with DiskPartitions and LogicalDisks,
a single instance of a DiskPartition may also have 1:N relationship with LogicalDisks.
This class does not represent such a relationship between them (Win32DiskPartition and Win32LogicalDisk)
since it's primary focus is to link both of them with Win32DiskDrive.
To fetch such a relation, check out the custom class Win32DiskPartitionToLogicalDisk.
This is purely a convenience class designed to help users of this library retrieve
drive–partition–logical disk associations in a single function call.
Using this class eliminates the need for calling the associated classes that are used
to fetch an association between the DiskDrive, DiskPartition and LogicalDisk classes,
namely Win32DiskDriveToDiskPartition and Win32LogicalDiskToPartition
However, they will remain available for use if you prefer to map contents yourself.
NOTE: I have tried keeping this document concise, but I do realize that the one-to-many association information may feel overwhelming, which is why I would recommend checking out the documentation of the individual classes first (linked towards the end of this class documentation). Each documentation for the individual classes also has a link for the official Microsoft documentation, which I would recommend reading and experimenting with, to have a better understanding of the classes and their associations with each other.
- Since:
- 3.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) @Nullable StringThe unique identifier for theWin32DiskDriveinstance.(package private) @Nullable Win32DiskDriveTheWin32DiskDriveentity associated with thedeviceId.(package private) @Nullable List<Win32DiskPartition> A list ofWin32DiskPartitionentities associated with thedeviceId.(package private) @Nullable List<Win32LogicalDisk> A list ofWin32LogicalDiskentities associated with thedeviceId. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
deviceId
The unique identifier for theWin32DiskDriveinstance.This corresponds to the physical disk ID such as
"\\\\.\\PHYSICALDRIVE0". -
diskDrive
TheWin32DiskDriveentity associated with thedeviceId.Represents the physical disk drive identified by the specified
deviceId. -
diskPartitionList
A list ofWin32DiskPartitionentities associated with thedeviceId.Represents all partitions physically present on the referenced
diskDrive. -
logicalDiskList
A list ofWin32LogicalDiskentities associated with thedeviceId.
-
-
Constructor Details
-
Win32DiskDriveToPartitionAndLogicalDisk
public Win32DiskDriveToPartitionAndLogicalDisk()
-
-
Method Details
-
toString
-