Table of Contents

Interface ISizeInfo

Namespace
ToSic.Eav.Apps.Assets
Assembly
ToSic.Eav.Apps.dll

Size information for files

[PublicApi]
public interface ISizeInfo

Remarks

  • Added in v14.04 as class, changed to interface in v17
  • Updated to use long in v21.06, as some data can be larger than 2GB, which is the limit of int.
  • Added ToString() in v21.06 to show the best size and unit in a human-readable format, e.g. "1.23 MB"

Properties

BestSize

Best size based on the number. Will be in KB, MB or GB. The unit is found on BestUnit

decimal BestSize { get; }

Property Value

decimal

BestUnit

Best unit to use based on the effective size.

string BestUnit { get; }

Property Value

string

Bytes

Size in bytes.

long Bytes { get; }

Property Value

long

Remarks

Type changed from int to long in v21.06

Gb

Size in GB

decimal Gb { get; }

Property Value

decimal

Kb

Size in KB

decimal Kb { get; }

Property Value

decimal

Mb

Size in MB

decimal Mb { get; }

Property Value

decimal

Methods

ToString()

Show the best size and best unit in a human-readable format, e.g. "1.23 MB"

string ToString()

Returns

string

Remarks

Added v21.06