Interface FormatSizeFlags


public interface FormatSizeFlags
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    set the size as a quantity in bits, rather than
    bytes, and return units in bits.
    static final int
    behave the same as g_format_size()
    static final int
    use IEC (base 1024) units with "KiB"-style
    suffixes.
    static final int
    include the exact number of bytes as part
    of the returned string.
    static final int
    return only unit, without value; this should
    not be used together with @G_FORMAT_SIZE_LONG_FORMAT
    nor @G_FORMAT_SIZE_ONLY_VALUE.
    static final int
    return only value, without unit; this should
    not be used together with @G_FORMAT_SIZE_LONG_FORMAT
    nor @G_FORMAT_SIZE_ONLY_UNIT.
  • Field Details

    • DEFAULT

      static final int DEFAULT
      behave the same as g_format_size()
      See Also:
    • LONG_FORMAT

      static final int LONG_FORMAT
      include the exact number of bytes as part
      of the returned string. For example, "45.6 kB (45,612 bytes)".
      See Also:
    • IEC_UNITS

      static final int IEC_UNITS
      use IEC (base 1024) units with "KiB"-style
      suffixes. IEC units should only be used for reporting things with
      a strong "power of 2" basis, like RAM sizes or RAID stripe sizes.
      Network and storage sizes should be reported in the normal SI units.
      See Also:
    • BITS

      static final int BITS
      set the size as a quantity in bits, rather than
      bytes, and return units in bits. For example, ‘Mb’ rather than ‘MB’.
      See Also:
    • ONLY_VALUE

      static final int ONLY_VALUE
      return only value, without unit; this should
      not be used together with @G_FORMAT_SIZE_LONG_FORMAT
      nor @G_FORMAT_SIZE_ONLY_UNIT. Since: 2.74
      See Also:
    • ONLY_UNIT

      static final int ONLY_UNIT
      return only unit, without value; this should
      not be used together with @G_FORMAT_SIZE_LONG_FORMAT
      nor @G_FORMAT_SIZE_ONLY_VALUE. Since: 2.74
      See Also: