Skip to content

Size

The Size object represents a file size.

classDiagram
  direction LR
  class Size{
    int inBytes
    string humanReadable
  }
It is possible to get file size with the extension by rendering the object directly.

source
{{ size }}
output
150 MB

Properties

Attribute name Type Description
inBytes int Size in bytes
humanReadable string Returns information about the file size along with the appropriate extension (B, kB, MB etc.)

Examples

inBytes property

{{ size.inBytes }}
1000

humanReadable property

{{ size.humanReadable }}
150 MB