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

Function GetRemotePCExplorer

Goldleaf/source/fs/fs_FileSystem.cpp:88–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 RemotePCExplorer *GetRemotePCExplorer(const std::string &mount_name) {
89 if((g_RemotePCExplorer != nullptr) && (g_RemotePCExplorer->GetMountName() != mount_name)) {
90 DeleteExplorer(g_RemotePCExplorer);
91 }
92
93 const auto mnt_name_root = fs::GetPathRoot(mount_name);
94 EnsureExplorer(g_RemotePCExplorer, mnt_name_root);
95
96 if(mount_name != mnt_name_root) {
97 auto base_path = fs::GetPathWithoutRoot(mount_name);
98 base_path.erase(0, 1);
99 g_RemotePCExplorer->NavigateForward(base_path);
100 }
101 return g_RemotePCExplorer;
102 }
103
104 DriveExplorer *GetDriveExplorer(const UsbHsFsDevice &drive) {
105 if((g_DriveExplorer != nullptr) && !drive::DrivesEqual(g_DriveExplorer->GetDrive(), drive)) {

Callers 1

Calls 6

DeleteExplorerFunction · 0.85
GetPathRootFunction · 0.85
EnsureExplorerFunction · 0.85
GetPathWithoutRootFunction · 0.85
GetMountNameMethod · 0.80
NavigateForwardMethod · 0.80

Tested by

no test coverage detected