VolumeData

VolumeDataModule. VolumeData

new VolumeData(dataopt)

Description:
  • Provides data of interest for volumes.

Source:
Parameters:
Name Type Attributes Description
data object <optional>

The settings to use for creating the object.

Properties
Name Type Attributes Description
name string <optional>

Name of the volume.

disk_id string <optional>

Disk identifier of the volume.

volume_type VOLUME_TYPES | string <optional>

File system type of the volume.

mount_point string <optional>

Mount point of the volume.

device_node string <optional>

Device node of the volume.

volume_uuid string <optional>

Unique identifier of the volume.

capacity_bytes number <optional>

Total size (in bytes) of the volume.

free_space_bytes number <optional>

Remaining space (in bytes) of the volume.

used_space_bytes number <optional>

Actively used space (in bytes) of the volume.

visible boolean <optional>

Flag indicating that the volume is visible to the user.

shown boolean <optional>

Flag indicating that the volume should be shown.

low_space_alert boolean <optional>

Flag indicating that the low space alert threshold has been exceeded.

Throws:
    • thrown if the configuration item is not the expected type.
    Type
    TypeError
    • thrown if the configuration parameters are out of bounds.
    Type
    RangeError

Members

DeviceNode

Description:
  • Read-Only Property accessor for the device node of the volume.

Source:

Read-Only Property accessor for the device node of the volume.

DiskId

Description:
  • Read-only property accessor for the disk identifier of the volume.

Source:

Read-only property accessor for the disk identifier of the volume.

FreeSpace

Description:
  • Read-Only Property accessor for free space (in bytes) of the volume.

Source:

Read-Only Property accessor for free space (in bytes) of the volume.

IsMounted

Description:
  • Read-Only Property accessor indicating if the volume is mounted.

Source:

Read-Only Property accessor indicating if the volume is mounted.

IsShown

Description:
  • Read-Only Property accessor indicating is the volume should be shown.

Source:

Read-Only Property accessor indicating is the volume should be shown.

IsVisible

Description:
  • Read-Only Property accessor indicating if the volume is visible to the user.

Source:

Read-Only Property accessor indicating if the volume is visible to the user.

LowSpaceAlert

Description:
  • Read-Only Property accessor indicating if the low space alert threshold has been exceeded.

Source:

Read-Only Property accessor indicating if the low space alert threshold has been exceeded.

MountPoint

Description:
  • Read-Only Property accessor for the mount point of the volume.

Source:

Read-Only Property accessor for the mount point of the volume.

Name

Description:
  • Read-only property accessor for the name of the volume

Source:

Read-only property accessor for the name of the volume

PercentFree

Description:
  • Read-Only Property accessor indicating the percentage of free space.

Source:

Read-Only Property accessor indicating the percentage of free space.

Size

Description:
  • Read-Only Property accessor for the size (in bytes) of the volume.

Source:

Read-Only Property accessor for the size (in bytes) of the volume.

UsedSpace

Description:
  • Read-Only Property accessor for used space (in bytes) of the volume.

Source:

Read-Only Property accessor for used space (in bytes) of the volume.

VolumeType

Description:
  • Read-only property accessor for the file system of the volume.

Source:

Read-only property accessor for the file system of the volume.

VolumeUUID

Description:
  • Read-Only Property accessor for the UUID of the volume.

Source:

Read-Only Property accessor for the UUID of the volume.

Methods

IsMatch(compareTarget) → {boolean}

Description:
  • Helper to determine if the supplied object is equivalent to this one.

Source:
Parameters:
Name Type Description
compareTarget object

Object used as the target or the comparison.

Returns:
  • true if the supplied object is a match. false otherwise.
Type
boolean

(static) ConvertFrom1KBlockaToBytes(blocks) → {number}

Description:
  • Helper to convert from 1k Blocks to bytes

Source:
Parameters:
Name Type Description
blocks number

Number of 1k blocks.

Throws:
    • thrown if the blocks is not a number
    Type
    TypeError
    • thrown if the blocks <= 0
    Type
    RangeError
Returns:
  • Size in bytes
Type
number

(static) ConvertFromBytesToGB(bytes, baseopt) → {number}

Description:
  • Helper to convert from bytes to GB

Source:
Parameters:
Name Type Attributes Description
bytes number

Size in bytes to be converted

base number | CONVERSION_BASES <optional>

Base to use for the conversion. (Default=CONVERSION_BASES.BASE_2)

Throws:
    • thrown if the bytes or base is not a number
    Type
    TypeError
    • thrown if the base is not valid.
    Type
    RangeError
Returns:
  • Size in GB
Type
number