Enumeration

ByteCountFormatter.CountStyle

Specifies display of file or storage byte counts. The display style is platform specific.

Declaration

enum CountStyle : Int

Topics

Constants

case file

Specifies display of file byte counts. The actual behavior for this is platform-specific; in macOS 10.8, this uses the decimal style, but that may change over time.

case memory

Specifies display of memory byte counts. The actual behavior for this is platform-specific; in macOS 10.8, this uses the binary style, but that may change over time.

case decimal

Causes 1000 bytes to be shown as 1 KB. It is better to use ByteCountFormatter.CountStyle.file or ByteCountFormatter.CountStyle.memory in most cases.

case binary

Causes 1024 bytes to be shown as 1 KB. It is better to use ByteCountFormatter.CountStyle.file or ByteCountFormatter.CountStyle.memory in most cases.