MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / LoadExtCSS

Function LoadExtCSS

daemon/HTTPServer.cpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46namespace http {
47
48 static void LoadExtCSS (std::string fileName = "style")
49 {
50 std::stringstream s;
51 std::string styleFile = i2p::fs::DataDirPath ("webconsole/"+fileName+".css");
52 if (i2p::fs::Exists(styleFile)) {
53 std::ifstream f(styleFile, std::ifstream::binary);
54 s << f.rdbuf();
55 externalCSS = s.str();
56 } else if (externalCSS.length() != 0) { // clean up external style if file was removed
57 externalCSS = "";
58 }
59 }
60
61 static void GetStyles (std::stringstream& s)
62 {

Callers 3

ShowPageHeadFunction · 0.85
HandleCommandMethod · 0.85
StartMethod · 0.85

Calls 2

DataDirPathFunction · 0.85
ExistsFunction · 0.85

Tested by

no test coverage detected