sepal_ui.scripts.utils.get_file_size#

sepal_ui.scripts.utils.get_file_size(filename)[source]#

Get the file size as string of 2 digit in the adapted scale (B, KB, MB….).

Parameters:

filename (str | Path) – the path to the file to measure

Returns:

the file size in a readable humanly readable

Return type:

str