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

Function GetExplorerForMountName

Goldleaf/source/fs/fs_FileSystem.cpp:112–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 }
111
112 Explorer *GetExplorerForMountName(const std::string &mount_name) {
113 if(IsExplorer(g_SdCardExplorer, mount_name)) {
114 return g_SdCardExplorer;
115 }
116 if(IsExplorer(g_RomFsExplorer, mount_name)) {
117 return g_RomFsExplorer;
118 }
119 if(IsExplorer(g_PRODINFOFExplorer, mount_name)) {
120 return g_PRODINFOFExplorer;
121 }
122 if(IsExplorer(g_NANDSafeExplorer, mount_name)) {
123 return g_NANDSafeExplorer;
124 }
125 if(IsExplorer(g_NANDUserExplorer, mount_name)) {
126 return g_NANDUserExplorer;
127 }
128 if(IsExplorer(g_NANDSystemExplorer, mount_name)) {
129 return g_NANDSystemExplorer;
130 }
131 if(IsExplorer(g_RemotePCExplorer, mount_name)) {
132 return g_RemotePCExplorer;
133 }
134 if(IsExplorer(g_DriveExplorer, mount_name)) {
135 return g_DriveExplorer;
136 }
137
138 for(auto &exp: g_MountedExplorers) {
139 if(IsExplorer(exp, mount_name)) {
140 return exp;
141 }
142 }
143 return nullptr;
144 }
145
146 Explorer *GetExplorerForPath(const std::string &path) {
147 return GetExplorerForMountName(GetPathRoot(path));

Callers 1

GetExplorerForPathFunction · 0.85

Calls 1

IsExplorerFunction · 0.85

Tested by

no test coverage detected