MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / GetPath

Method GetPath

PathCopyCopy/plugins/src/UNCPathPlugin.cpp:76–94  ·  view source on GitHub ↗

Returns the UNC path of the specified file. @param p_File File path. @returns UNC path if file has one, otherwise its long path.

Source from the content-addressed store, hash-verified

74 // @returns UNC path if file has one, otherwise its long path.
75 //
76 std::wstring UNCPathPlugin::GetPath(const std::wstring& p_File) const
77 {
78 // Call parent to get long path.
79 std::wstring path = LongPathPlugin::GetPath(p_File);
80
81 // Try to get path on mapped network drive.
82 std::wstring newPath = path;
83 bool converted = GetMappedDriveFilePath(newPath);
84
85 // If it wasn't on a mapped drive, check if it's in a network share.
86 if (!converted) {
87 converted = GetNetworkShareFilePath(newPath);
88 }
89
90 if (converted) {
91 path = newPath;
92 }
93 return path;
94 }
95
96 //
97 // Protected constructor with custom description and help text resources.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected