MCPcopy Create free account
hub / github.com/USBGuard/usbguard / open

Method open

src/Library/ConfigFilePrivate.cpp:54–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 void ConfigFilePrivate::open(const std::string& path, bool readonly)
55 {
56 _readonly = readonly;
57
58 if (_readonly) {
59 _stream.open(path, std::ios::in);
60 }
61 else {
62 _stream.open(path, std::ios::in|std::ios::out);
63 }
64
65 if (!_stream.is_open()) {
66 throw Exception("Configuration", path, "unable to open the configuration file");
67 }
68
69 parse();
70 }
71
72 void ConfigFilePrivate::write()
73 {

Callers 2

loadConfigurationMethod · 0.45

Calls 1

ExceptionFunction · 0.85

Tested by

no test coverage detected