The FileSize class is used for representing file size. FileSize class cannot be negative, if you pass negative number it will be converted to 0.

IMPORT_PATH: "@daiso-tech/core/file-size"

Implements

Methods

  • Checks if this value equals the given value. Implementation defines what "equal" means for this type.

    Parameters

    • value: IFileSize

      The value to compare against

    Returns boolean

    True if values are equal, false otherwise

  • Serializes this instance to a versioned format. Instance method that converts the current state to a storable/transportable form. Must include a version field for deserialization to know how to reconstruct.

    Returns SerializedFileSize

    Serialized representation with version field