| 77 | } |
| 78 | |
| 79 | u64 GetFreeSpaceForPartition(const Partition partition) { |
| 80 | fs::Explorer *exp = nullptr; |
| 81 | switch(partition) { |
| 82 | case Partition::PRODINFOF: { |
| 83 | exp = fs::GetPRODINFOFExplorer(); |
| 84 | break; |
| 85 | } |
| 86 | case Partition::NANDSafe: { |
| 87 | exp = fs::GetNANDSafeExplorer(); |
| 88 | break; |
| 89 | } |
| 90 | case Partition::NANDSystem: { |
| 91 | exp = fs::GetNANDSystemExplorer(); |
| 92 | break; |
| 93 | } |
| 94 | case Partition::NANDUser: { |
| 95 | exp = fs::GetNANDUserExplorer(); |
| 96 | break; |
| 97 | } |
| 98 | case Partition::SdCard: { |
| 99 | exp = fs::GetSdCardExplorer(); |
| 100 | break; |
| 101 | } |
| 102 | } |
| 103 | if(exp != nullptr) { |
| 104 | return exp->GetFreeSpace(); |
| 105 | } |
| 106 | return 0; |
| 107 | } |
| 108 | |
| 109 | std::string FormatSize(const u64 bytes) { |
| 110 | if(bytes == 0) { |
no test coverage detected