mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
make beautifyFileSize public
This general function will be useful in other kiwix apps
This commit is contained in:
@ -216,5 +216,14 @@ std::map<std::string, std::string> getNetworkInterfaces();
|
||||
*/
|
||||
std::string getBestPublicIp();
|
||||
|
||||
/** Converts file size to human readable format.
|
||||
*
|
||||
* This function will convert a number to its equivalent size using units.
|
||||
*
|
||||
* @param number file size in bytes.
|
||||
* @return a human-readable string representation of the size, e.g., "2.3 KB", "1.8 MB", "5.2 GB".
|
||||
*/
|
||||
std::string beautifyFileSize(uint64_t number);
|
||||
|
||||
}
|
||||
#endif // KIWIX_TOOLS_H
|
||||
|
Reference in New Issue
Block a user