java.lang.Object
io.github.eggy03.ferrumx.windows.entity.storage.DiskDrive

public class DiskDrive extends Object
Immutable representation of a physical or logical drive on a Windows system.

Fields correspond to properties retrieved from the Win32_DiskDrive WMI class.

Instances are thread-safe and may be safely cached or shared across threads.

Usage examples


 // Build a new DiskDrive instance
 DiskDrive drive = DiskDrive.builder()
     .deviceId("\\\\.\\PHYSICALDRIVE0")
     .caption("Samsung SSD 970 EVO")
     .model("MZ-V7E1T0")
     .size(1000204886016L)
     .firmwareRevision("2B2QEXM7")
     .serialNumber("S4EVNX0M123456")
     .partitions(3)
     .status("OK")
     .interfaceType("NVMe")
     .pnpDeviceId("PCI\\VEN_144D&DEV_A808&SUBSYS_0A0E144D&REV_01\\4&1A2B3C4D&0&000000")
     .build();

 // Create a modified copy
 DiskDrive updatedDrive = drive.toBuilder()
     .size(2000409772032L)
     .build();

 
DiskPartition contains information about partitions on this disk.
Since:
2.0.0
Author:
Egg-03
See Also:
  • Constructor Details

    • DiskDrive

      public DiskDrive()
  • Method Details