File Size v1.3.0 FileSize.Comparable protocol View Source

A protocol that allows comparison of two file sizes.

Link to this section Summary

Types

A type that describes the value that is returned as comparison result of two file sizes. The value -1 indicates that the first value is less than the second one. 1 means thta the first value is greater than the second one. 0 indicates equality.

t()

Functions

Compares two file sizes and returns a value indicating whether the first value is less than, greater than or equal to the second one. For possible return values, see comparison_result/0.

Link to this section Types

Link to this type

comparison_result() View Source
comparison_result() :: -1 | 0 | 1

A type that describes the value that is returned as comparison result of two file sizes. The value -1 indicates that the first value is less than the second one. 1 means thta the first value is greater than the second one. 0 indicates equality.

Link to this section Functions

Link to this function

compare(size, other_size) View Source

Compares two file sizes and returns a value indicating whether the first value is less than, greater than or equal to the second one. For possible return values, see comparison_result/0.