File Size v2.1.1 FileSize.Units View Source
A module to retrieve information about known units.
Link to this section Summary
Functions
Gets unit info for the unit specified by the given name.
Gets unit info for the unit specified by the given name. Raises when the unit with the given name is unknown.
Gets a list of all defined units.
Link to this section Functions
Link to this function
fetch(unit_or_unit_info)
View Source
(since 2.0.0)
fetch(unit_or_unit_info)
View Source
(since 2.0.0)
fetch(FileSize.unit()) :: {:ok, FileSize.Units.Info.t()} | :error
fetch(FileSize.unit()) :: {:ok, FileSize.Units.Info.t()} | :error
Gets unit info for the unit specified by the given name.
Link to this function
fetch!(unit)
View Source
(since 2.0.0)
fetch!(unit)
View Source
(since 2.0.0)
fetch!(FileSize.unit()) :: FileSize.Units.Info.t() | no_return()
fetch!(FileSize.unit()) :: FileSize.Units.Info.t() | no_return()
Gets unit info for the unit specified by the given name. Raises when the unit with the given name is unknown.
Link to this function
list()
View Source
(since 2.0.0)
list()
View Source
(since 2.0.0)
list() :: [FileSize.Units.Info.t()]
list() :: [FileSize.Units.Info.t()]
Gets a list of all defined units.