MCPcopy Create free account
hub / github.com/catboost/catboost / WinHardLink

Function WinHardLink

util/system/fs_win.cpp:111–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 }
110
111 bool WinHardLink(const TString& existingPath, const TString& newPath) {
112 TUtf16String ep, np;
113 LPCWSTR epPtr = UTF8ToWCHAR(existingPath, ep);
114 LPCWSTR npPtr = UTF8ToWCHAR(newPath, np);
115 if (!epPtr || !npPtr) {
116 ::SetLastError(ERROR_INVALID_NAME);
117 return false;
118 }
119
120 return (CreateHardLinkW(npPtr, epPtr, nullptr) != 0);
121 }
122
123 bool WinExists(const TString& path) {
124 TUtf16String buf;

Callers 1

HardLinkMethod · 0.85

Calls 1

UTF8ToWCHARFunction · 0.70

Tested by

no test coverage detected