Class Win32LogicalDisk

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

@ShallowImmutable public class Win32LogicalDisk extends Object
Immutable representation of a Logical disk volume on a Windows system.

Fields correspond to properties retrieved from the Win32_LogicalDisk WMI class.

Usage examples

// Build a new LogicalDisk instance
Win32LogicalDisk lDisk = Win32LogicalDisk.builder()
    .deviceId("C:")
    .driveType(3)
    .fileSystem("NTFS")
    .size(1000204886016L)
    .build();

// Create a modified copy
Win32LogicalDisk updatedDisk = drive.toBuilder()
    .size(2000409772032L)
    .fileSystem("ReFS")
    .build();

See Win32DiskDrive for information about physical disks in the system.

See Win32DiskPartition for information about partitions in a physical disk.

Since:
3.0.0
See Also:
  • Field Details

    • deviceId

      @SerializedName("DeviceID") @Nullable @Nullable String deviceId
      Unique identifier of the logical disk from other devices on the system. Appears as the drive letter assigned to the partition in the physical disk Example: "C:"
    • description

      @SerializedName("Description") @Nullable @Nullable String description
      Description of the logical disk object.
    • driveType

      @SerializedName("DriveType") @Nullable @Nullable Long driveType
      Numeric value that corresponds to the type of disk drive this logical disk represents.
      • 0 – Unknown
      • 1 – No Root Directory
      • 2 – Removable Disk
      • 3 – Local Disk
      • 4 – Network Drive
      • 5 – Compact Disc
      • 6 – RAM Disk

      Data type: uint32

    • mediaType

      @SerializedName("MediaType") @Nullable @Nullable Long mediaType
      Type of media currently present in the logical drive. Value corresponds to a member of the MEDIA_TYPE enumeration defined in Winioctl.h. Visit the microsoft documentation stated at the class level to know about the possible values.
    • fileSystem

      @SerializedName("FileSystem") @Nullable @Nullable String fileSystem
      File system on the logical disk. Example: "NTFS", "FAT32", "ReFS"
    • size

      @SerializedName("Size") @Nullable @Nullable BigInteger size
      Size of the disk drive in bytes.
    • freeSpace

      @SerializedName("FreeSpace") @Nullable @Nullable BigInteger freeSpace
      Free space, in bytes, available on the logical disk.
    • compressed

      @SerializedName("Compressed") @Nullable @Nullable Boolean compressed
      Indicates if the logical volume exists as a single compressed entity (e.g., DoubleSpace). If file-based compression is supported (e.g., NTFS), this value is false.
    • supportsFileBasedCompression

      @SerializedName("SupportsFileBasedCompression") @Nullable @Nullable Boolean supportsFileBasedCompression
      Indicates whether the logical disk supports file-based compression (e.g., NTFS).
    • supportsDiskQuotas

      @SerializedName("SupportsDiskQuotas") @Nullable @Nullable Boolean supportsDiskQuotas
      Indicates whether this volume supports disk quotas.
    • volumeName

      @SerializedName("VolumeName") @Nullable @Nullable String volumeName
      Volume name of the logical disk. Example: "Local Disk"
    • volumeSerialNumber

      @SerializedName("VolumeSerialNumber") @Nullable @Nullable String volumeSerialNumber
      Volume serial number of the logical disk.
  • Constructor Details

    • Win32LogicalDisk

      public Win32LogicalDisk()
  • Method Details

    • isCompressed

      @Nullable public @Nullable Boolean isCompressed()
    • supportsFileBasedCompression

      @Nullable public @Nullable Boolean supportsFileBasedCompression()
    • supportsDiskQuotas

      @Nullable public @Nullable Boolean supportsDiskQuotas()
    • toString

      @NotNull public @NotNull String toString()
      Retrieves the entity in a JSON pretty-print formatted string
      Overrides:
      toString in class Object
      Returns:
      the String value of the object in JSON pretty-print format