MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetAuthCookie

Function GetAuthCookie

src/rpc/protocol.cpp:110–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool GetAuthCookie(std::string *cookie_out)
111{
112 std::ifstream file;
113 std::string cookie;
114 fs::path filepath = GetAuthCookieFile();
115 file.open(filepath.string().c_str());
116 if (!file.is_open())
117 return false;
118 std::getline(file, cookie);
119 file.close();
120
121 if (cookie_out)
122 *cookie_out = cookie;
123 return true;
124}
125
126void DeleteAuthCookie()
127{

Callers 1

CallRPCFunction · 0.85

Calls 2

GetAuthCookieFileFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected