fluentfs.filesize.file_size.FileSize¶
- class fluentfs.filesize.file_size.FileSize(size_bytes: int)¶
Bases:
object- __init__(size_bytes: int) None¶
Methods
__init__(size_bytes)size([unit, rounding])Get the size as a readable string.
size_f([unit])Get the size as float.
Attributes
ConversionValues- size(unit: FileSizeUnit = FileSizeUnit.AUTO, rounding: int = 3) str¶
Get the size as a readable string.
- Parameters:
unit – The unit to use.
rounding – The number of digits to round the size to.
- Returns:
The size.
- size_f(unit: FileSizeUnit = FileSizeUnit.AUTO) float¶
Get the size as float.
- Parameters:
unit – The unit to use.
- Returns:
The size.