aboutsummaryrefslogtreecommitdiff
path: root/src/util/system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/system.cpp')
-rw-r--r--src/util/system.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index b0a538b527..0790ea0d48 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -141,6 +141,12 @@ bool CheckDiskSpace(const fs::path& dir, uint64_t additional_bytes)
return free_bytes_available >= min_disk_space + additional_bytes;
}
+std::streampos GetFileSize(const char* path, std::streamsize max) {
+ std::ifstream file(path, std::ios::binary);
+ file.ignore(max);
+ return file.gcount();
+}
+
/**
* Interpret a string argument as a boolean.
*
@@ -226,10 +232,11 @@ static bool CheckValid(const std::string& key, const util::SettingsValue& val, u
return true;
}
-ArgsManager::ArgsManager()
-{
- // nothing to do
-}
+// Define default constructor and destructor that are not inline, so code instantiating this class doesn't need to
+// #include class definitions for all members.
+// For example, m_settings has an internal dependency on univalue.
+ArgsManager::ArgsManager() {}
+ArgsManager::~ArgsManager() {}
const std::set<std::string> ArgsManager::GetUnsuitableSectionOnlyArgs() const
{