This commit introduces the get_available_disk method to the SystemInformation struct. This method enables the retrieval of available disk space for a specific folder. It takes a folder name as an argument and returns the available disk space as a Result<u64, String>. If the disk is found, the available space is returned; otherwise, an error message is returned.
Additionally, several tests are included to ensure the proper functionality of the code.
This commit introduces the
get_available_disk
method to theSystemInformation
struct. This method enables the retrieval of available disk space for a specific folder. It takes a folder name as an argument and returns the available disk space as aResult<u64, String>
. If the disk is found, the available space is returned; otherwise, an error message is returned.Additionally, several tests are included to ensure the proper functionality of the code.