| 47 | } |
| 48 | |
| 49 | u64 GetTotalSpaceForPartition(const Partition partition) { |
| 50 | fs::Explorer *exp = nullptr; |
| 51 | switch(partition) { |
| 52 | case Partition::PRODINFOF: { |
| 53 | exp = fs::GetPRODINFOFExplorer(); |
| 54 | break; |
| 55 | } |
| 56 | case Partition::NANDSafe: { |
| 57 | exp = fs::GetNANDSafeExplorer(); |
| 58 | break; |
| 59 | } |
| 60 | case Partition::NANDSystem: { |
| 61 | exp = fs::GetNANDSystemExplorer(); |
| 62 | break; |
| 63 | } |
| 64 | case Partition::NANDUser: { |
| 65 | exp = fs::GetNANDUserExplorer(); |
| 66 | break; |
| 67 | } |
| 68 | case Partition::SdCard: { |
| 69 | exp = fs::GetSdCardExplorer(); |
| 70 | break; |
| 71 | } |
| 72 | } |
| 73 | if(exp != nullptr) { |
| 74 | return exp->GetTotalSpace(); |
| 75 | } |
| 76 | return 0; |
| 77 | } |
| 78 | |
| 79 | u64 GetFreeSpaceForPartition(const Partition partition) { |
| 80 | fs::Explorer *exp = nullptr; |
no test coverage detected