MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / GetFreeSpaceForPartition

Function GetFreeSpaceForPartition

Goldleaf/source/fs/fs_Common.cpp:79–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers 3

OnFileSelectedMethod · 0.85
OnDirectorySelectedMethod · 0.85
UpdateElementsMethod · 0.85

Calls 6

GetPRODINFOFExplorerFunction · 0.85
GetNANDSafeExplorerFunction · 0.85
GetNANDSystemExplorerFunction · 0.85
GetNANDUserExplorerFunction · 0.85
GetSdCardExplorerFunction · 0.85
GetFreeSpaceMethod · 0.45

Tested by

no test coverage detected