From c0642023638a70d034109cbe636fb7fde675e3d2 Mon Sep 17 00:00:00 2001 From: bthomee Date: Fri, 25 Jul 2025 15:58:19 +0000 Subject: [PATCH] deploy: 921aef9934fba3a947fe3d6d38de756abd3a6adc --- Application_8cpp_source.html | 6 +- Application_8h_source.html | 2 +- CaptureLogs_8h_source.html | 4 +- CheckMessageLogs_8h_source.html | 4 +- Config_8cpp_source.html | 2 +- Config__test_8cpp_source.html | 20 +- DatabaseCon_8cpp_source.html | 2 +- DatabaseCon_8h_source.html | 2 +- Env_8h_source.html | 2 +- FileDirGuard_8h_source.html | 331 ++-- FileUtilities_8cpp_source.html | 158 +- FileUtilities_8h_source.html | 4 +- FileUtilities__test_8cpp_source.html | 8 +- JobQueue_8cpp_source.html | 2 +- JobQueue_8h_source.html | 2 +- JobTypeData_8h_source.html | 2 +- LogLevel_8cpp_source.html | 4 +- Log_8cpp_source.html | 32 +- Log_8h_source.html | 466 +++--- Main_8cpp_source.html | 4 +- RPCCall_8cpp_source.html | 2 +- RPCSub_8cpp_source.html | 2 +- RPCSub_8h_source.html | 2 +- RippleCalc_8cpp_source.html | 2 +- RippleCalc_8h_source.html | 2 +- ServerStatus__test_8cpp_source.html | 2 +- SociDB_8cpp_source.html | 2 +- SociDB_8h_source.html | 2 +- TrustedPublisherServer_8h_source.html | 1423 ++++++++--------- ValidatorList_8cpp_source.html | 2 +- ValidatorRPC__test_8cpp_source.html | 6 +- ValidatorSite__test_8cpp_source.html | 12 +- WorkFile_8h_source.html | 2 +- classripple_1_1Logs.html | 16 +- classripple_1_1Logs_1_1File.html | 10 +- classripple_1_1Logs_1_1Sink.html | 6 +- classripple_1_1ValidatorList.html | 2 +- classripple_1_1ValidatorSite.html | 2 +- classripple_1_1detail_1_1RippledCfgGuard.html | 20 +- ...ipple_1_1detail_1_1ValidatorsTxtGuard.html | 20 +- classripple_1_1test_1_1CaptureLogs.html | 14 +- classripple_1_1test_1_1CheckMessageLogs.html | 14 +- ...ple_1_1test_1_1TrustedPublisherServer.html | 62 +- ...sripple_1_1test_1_1detail_1_1DirGuard.html | 18 +- ...ple_1_1test_1_1detail_1_1FileDirGuard.html | 26 +- classripple_1_1test_1_1jtx_1_1SuiteLogs.html | 14 +- compression__test_8cpp_source.html | 2 +- index.html | 18 +- md____w_rippled_rippled_BUILD.html | 25 +- ...ed_rippled_Builds_levelization_README.html | 2 +- md____w_rippled_rippled_CONTRIBUTING.html | 122 +- md____w_rippled_rippled_SECURITY.html | 16 +- ...rippled_docs_0001_negative_unl_README.html | 54 +- ...ippled_docs_0010_ledger_replay_README.html | 4 +- md____w_rippled_rippled_docs_CheatSheet.html | 4 +- md____w_rippled_rippled_docs_CodingStyle.html | 6 +- ..._w_rippled_rippled_docs_HeapProfiling.html | 4 +- md____w_rippled_rippled_docs_README.html | 6 +- md____w_rippled_rippled_docs_build_conan.html | 4 +- ...__w_rippled_rippled_docs_build_depend.html | 4 +- ...ippled_rippled_docs_build_environment.html | 4 +- ..._w_rippled_rippled_docs_build_install.html | 6 +- md____w_rippled_rippled_docs_consensus.html | 42 +- ...ed_rippled_include_xrpl_basics_README.html | 2 +- ...ude_xrpl_proto_org_xrpl_rpc_v1_README.html | 14 +- ..._rippled_include_xrpl_protocol_README.html | 6 +- ..._rippled_include_xrpl_resource_README.html | 10 +- md_test_README.html | 2 +- md_test_csf_README.html | 14 +- md_xrpld_app_ledger_README.html | 64 +- md_xrpld_app_misc_FeeEscalation.html | 22 +- md_xrpld_app_misc_README.html | 8 +- md_xrpld_app_rdb_README.html | 12 +- md_xrpld_nodestore_README.html | 12 +- md_xrpld_overlay_README.html | 36 +- md_xrpld_peerfinder_README.html | 42 +- md_xrpld_rpc_README.html | 6 +- md_xrpld_shamap_README.html | 32 +- namespaceripple.html | 6 +- namespaceripple_1_1test.html | 2 +- overlay_2Slot_8h_source.html | 2 +- reduce__relay__test_8cpp_source.html | 2 +- ...1_1TrustedPublisherServer_1_1BlobInfo.html | 8 +- ..._1TrustedPublisherServer_1_1Validator.html | 8 +- ...t_1_1TrustedPublisherServer_1_1lambda.html | 16 +- 85 files changed, 1690 insertions(+), 1701 deletions(-) diff --git a/Application_8cpp_source.html b/Application_8cpp_source.html index d763fe3d85..fa53ef3f05 100644 --- a/Application_8cpp_source.html +++ b/Application_8cpp_source.html @@ -157,7 +157,7 @@ $(function() {
79#include <chrono>
80#include <condition_variable>
81#include <cstring>
-
82#include <iostream>
+
82#include <fstream>
83#include <limits>
84#include <mutex>
85#include <optional>
@@ -2481,7 +2481,7 @@ $(function() {
Manages the lifetime of ledger replay tasks.
Manages the current fee schedule.
Definition: LoadFeeTrack.h:45
Manages load sources.
Definition: LoadManager.h:46
-
Manages partitions for logging.
Definition: Log.h:51
+
Manages partitions for logging.
Definition: Log.h:52
Remembers manifests with the highest sequence number.
Definition: Manifest.h:256
Provides server functionality for clients.
Definition: NetworkOPs.h:89
Definition: NodeFamily.h:31
@@ -2532,11 +2532,11 @@ $(function() {
T empty(T... args)
T endl(T... args)
+
T get(T... args)
T hardware_concurrency(T... args)
-
T load(T... args)
T max(T... args)
diff --git a/Application_8h_source.html b/Application_8h_source.html index 129136f271..3050483f11 100644 --- a/Application_8h_source.html +++ b/Application_8h_source.html @@ -443,7 +443,7 @@ $(function() {
Holds a ledger.
Definition: Ledger.h:80
Manages the current fee schedule.
Definition: LoadFeeTrack.h:45
Manages load sources.
Definition: LoadManager.h:46
-
Manages partitions for logging.
Definition: Log.h:51
+
Manages partitions for logging.
Definition: Log.h:52
Remembers manifests with the highest sequence number.
Definition: Manifest.h:256
Provides server functionality for clients.
Definition: NetworkOPs.h:89
Persistency layer for NodeObject.
Definition: Database.h:52
diff --git a/CaptureLogs_8h_source.html b/CaptureLogs_8h_source.html index a9e60977c5..c1db5bd37e 100644 --- a/CaptureLogs_8h_source.html +++ b/CaptureLogs_8h_source.html @@ -170,8 +170,8 @@ $(function() {
Abstraction for the underlying message destination.
Definition: Journal.h:76
virtual Severity threshold() const
Returns the minimum severity level this sink will report.
-
Definition: Log.h:54
-
Manages partitions for logging.
Definition: Log.h:51
+
Definition: Log.h:55
+
Manages partitions for logging.
Definition: Log.h:52
beast::severities::Severity threshold() const
Definition: Log.cpp:166
sink for writing all log messages to a stringstream
Definition: CaptureLogs.h:44
std::mutex & strmMutex_
Definition: CaptureLogs.h:45
diff --git a/CheckMessageLogs_8h_source.html b/CheckMessageLogs_8h_source.html index c28593f688..92b71ae61f 100644 --- a/CheckMessageLogs_8h_source.html +++ b/CheckMessageLogs_8h_source.html @@ -158,8 +158,8 @@ $(function() {
Abstraction for the underlying message destination.
Definition: Journal.h:76
virtual Severity threshold() const
Returns the minimum severity level this sink will report.
-
Definition: Log.h:54
-
Manages partitions for logging.
Definition: Log.h:51
+
Definition: Log.h:55
+
Manages partitions for logging.
Definition: Log.h:52
beast::severities::Severity threshold() const
Definition: Log.cpp:166
CheckMessageSink(beast::severities::Severity threshold, CheckMessageLogs &owner)
diff --git a/Config_8cpp_source.html b/Config_8cpp_source.html index 41fb4fff05..8f5ea03fe5 100644 --- a/Config_8cpp_source.html +++ b/Config_8cpp_source.html @@ -1341,7 +1341,7 @@ $(function() {
static std::string getEnvVar(char const *name)
Definition: Config.cpp:252
std::optional< uint256 > getRegisteredFeature(std::string const &name)
Definition: Feature.cpp:382
@ match
-
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
+
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
FeeSetup setup_FeeVote(Section const &section)
Definition: Config.cpp:1128
bool isProperlyFormedTomlDomain(std::string_view domain)
Determines if the given string looks like a TOML-file hosting domain.
std::unordered_map< std::string, std::vector< std::string > > IniFileSections
Definition: BasicConfig.h:37
diff --git a/Config__test_8cpp_source.html b/Config__test_8cpp_source.html index 742cb7745f..f347e7f088 100644 --- a/Config__test_8cpp_source.html +++ b/Config__test_8cpp_source.html @@ -1655,16 +1655,16 @@ $(function() {
std::string validatorsFile() const
bool validatorsFileExists() const
ValidatorsTxtGuard(beast::unit_test::suite &test, path subDir, path const &validatorsFileName, bool useCounter=true)
-
Create a directory and remove it when it's done.
Definition: FileDirGuard.h:37
-
path const & subdir() const
Definition: FileDirGuard.h:100
-
auto rmDir(path const &toRm)
Definition: FileDirGuard.h:49
-
beast::unit_test::suite & test_
Definition: FileDirGuard.h:46
-
boost::filesystem::path path
Definition: FileDirGuard.h:39
-
Write a file in a directory and remove when done.
Definition: FileDirGuard.h:110
-
path const file_
Definition: FileDirGuard.h:112
-
bool fileExists() const
Definition: FileDirGuard.h:172
-
path const & file() const
Definition: FileDirGuard.h:166
-
FileDirGuard(beast::unit_test::suite &test, path subDir, path file, std::string const &contents, bool useCounter=true, bool create=true)
Definition: FileDirGuard.h:116
+
Create a directory and remove it when it's done.
Definition: FileDirGuard.h:39
+
path const & subdir() const
Definition: FileDirGuard.h:102
+
auto rmDir(path const &toRm)
Definition: FileDirGuard.h:51
+
beast::unit_test::suite & test_
Definition: FileDirGuard.h:48
+
boost::filesystem::path path
Definition: FileDirGuard.h:41
+
Write a file in a directory and remove when done.
Definition: FileDirGuard.h:112
+
path const file_
Definition: FileDirGuard.h:114
+
bool fileExists() const
Definition: FileDirGuard.h:174
+
path const & file() const
Definition: FileDirGuard.h:168
+
FileDirGuard(beast::unit_test::suite &test, path subDir, path file, std::string const &contents, bool useCounter=true, bool create=true)
Definition: FileDirGuard.h:118
T empty(T... args)
T endl(T... args)
diff --git a/DatabaseCon_8cpp_source.html b/DatabaseCon_8cpp_source.html index 13193ba13e..f1776eb10b 100644 --- a/DatabaseCon_8cpp_source.html +++ b/DatabaseCon_8cpp_source.html @@ -383,7 +383,7 @@ $(function() {
std::shared_ptr< soci::session > const session_
Definition: DatabaseCon.h:247
std::shared_ptr< Checkpointer > checkpointer_
Definition: DatabaseCon.h:248
A pool of threads to perform work.
Definition: JobQueue.h:58
-
Manages partitions for logging.
Definition: Log.h:51
+
Manages partitions for logging.
Definition: Log.h:52
T empty(T... args)
diff --git a/DatabaseCon_8h_source.html b/DatabaseCon_8h_source.html index cdb0cb47d5..6af362290f 100644 --- a/DatabaseCon_8h_source.html +++ b/DatabaseCon_8h_source.html @@ -373,7 +373,7 @@ $(function() {
LockedSociSession(std::shared_ptr< soci::session > it, mutex &m)
Definition: DatabaseCon.h:50
std::shared_ptr< soci::session > session_
Definition: DatabaseCon.h:46
soci::session * operator->()
Definition: DatabaseCon.h:74
-
Manages partitions for logging.
Definition: Log.h:51
+
Manages partitions for logging.
Definition: Log.h:52
T get(T... args)
diff --git a/Env_8h_source.html b/Env_8h_source.html index f651e14d68..b9ebaf47db 100644 --- a/Env_8h_source.html +++ b/Env_8h_source.html @@ -678,7 +678,7 @@ $(function() {
virtual bool checkSigs() const =0
Definition: Feature.h:158
A currency issued by an account.
Definition: Issue.h:33
-
Manages partitions for logging.
Definition: Log.h:51
+
Manages partitions for logging.
Definition: Log.h:52
beast::severities::Severity threshold() const
Definition: Log.cpp:166
Definition: MPTIssue.h:33
std::shared_ptr< OpenView const > current() const
Returns a view to the current open ledger.
Definition: OpenLedger.cpp:51
diff --git a/FileDirGuard_8h_source.html b/FileDirGuard_8h_source.html index 3b8f5f6f8c..3a3cf43bbb 100644 --- a/FileDirGuard_8h_source.html +++ b/FileDirGuard_8h_source.html @@ -104,177 +104,180 @@ $(function() {
26
27#include <boost/filesystem.hpp>
28
-
29namespace ripple {
-
30namespace test {
-
31namespace detail {
-
32
-
36class DirGuard
-
37{
-
38protected:
-
39 using path = boost::filesystem::path;
-
40
-
41private:
-
42 path subDir_;
-
43 bool rmSubDir_{false};
-
44
-
45protected:
-
46 beast::unit_test::suite& test_;
-
47
-
48 auto
-
49 rmDir(path const& toRm)
-
50 {
-
51 if (is_directory(toRm) && is_empty(toRm))
-
52 remove(toRm);
-
53 else
-
54 test_.log << "Expected " << toRm.string()
-
55 << " to be an empty existing directory." << std::endl;
-
56 }
-
57
-
58public:
-
59 DirGuard(beast::unit_test::suite& test, path subDir, bool useCounter = true)
-
60 : subDir_(std::move(subDir)), test_(test)
-
61 {
-
62 using namespace boost::filesystem;
-
63
-
64 static auto subDirCounter = 0;
-
65 if (useCounter)
-
66 subDir_ += std::to_string(++subDirCounter);
-
67 if (!exists(subDir_))
-
68 {
-
69 create_directory(subDir_);
-
70 rmSubDir_ = true;
-
71 }
-
72 else if (is_directory(subDir_))
-
73 rmSubDir_ = false;
-
74 else
-
75 {
-
76 // Cannot run the test. Someone created a file where we want to
-
77 // put our directory
-
78 Throw<std::runtime_error>(
-
79 "Cannot create directory: " + subDir_.string());
-
80 }
-
81 }
-
82
-
83 ~DirGuard()
-
84 {
-
85 try
-
86 {
-
87 using namespace boost::filesystem;
-
88
-
89 if (rmSubDir_)
-
90 rmDir(subDir_);
-
91 }
-
92 catch (std::exception& e)
-
93 {
-
94 // if we throw here, just let it die.
-
95 test_.log << "Error in ~DirGuard: " << e.what() << std::endl;
-
96 };
-
97 }
-
98
-
99 path const&
-
100 subdir() const
-
101 {
-
102 return subDir_;
-
103 }
-
104};
-
105
-
109class FileDirGuard : public DirGuard
-
110{
-
111protected:
-
112 path const file_;
-
113 bool created_ = false;
-
114
-
115public:
-
116 FileDirGuard(
-
117 beast::unit_test::suite& test,
-
118 path subDir,
-
119 path file,
-
120 std::string const& contents,
-
121 bool useCounter = true,
-
122 bool create = true)
-
123 : DirGuard(test, subDir, useCounter)
-
124 , file_(file.is_absolute() ? file : subdir() / file)
-
125 {
-
126 if (!exists(file_))
-
127 {
-
128 if (create)
-
129 {
-
130 std::ofstream o(file_.string());
-
131 o << contents;
-
132 created_ = true;
-
133 }
-
134 }
-
135 else
-
136 {
-
137 Throw<std::runtime_error>(
-
138 "Refusing to overwrite existing file: " + file_.string());
-
139 }
-
140 }
-
141
-
142 ~FileDirGuard()
-
143 {
-
144 try
-
145 {
-
146 using namespace boost::filesystem;
-
147 if (exists(file_))
-
148 {
-
149 remove(file_);
-
150 }
-
151 else
-
152 {
-
153 if (created_)
-
154 test_.log << "Expected " << file_.string()
-
155 << " to be an existing file." << std::endl;
-
156 }
-
157 }
-
158 catch (std::exception& e)
-
159 {
-
160 // if we throw here, just let it die.
-
161 test_.log << "Error in ~FileGuard: " << e.what() << std::endl;
-
162 };
-
163 }
-
164
-
165 path const&
-
166 file() const
-
167 {
-
168 return file_;
-
169 }
-
170
-
171 bool
-
172 fileExists() const
-
173 {
-
174 return boost::filesystem::exists(file_);
-
175 }
-
176};
-
177
-
178} // namespace detail
-
179} // namespace test
-
180} // namespace ripple
-
181
-
182#endif // TEST_UNIT_TEST_DIRGUARD_H
+
29#include <fstream>
+
30
+
31namespace ripple {
+
32namespace test {
+
33namespace detail {
+
34
+
38class DirGuard
+
39{
+
40protected:
+
41 using path = boost::filesystem::path;
+
42
+
43private:
+
44 path subDir_;
+
45 bool rmSubDir_{false};
+
46
+
47protected:
+
48 beast::unit_test::suite& test_;
+
49
+
50 auto
+
51 rmDir(path const& toRm)
+
52 {
+
53 if (is_directory(toRm) && is_empty(toRm))
+
54 remove(toRm);
+
55 else
+
56 test_.log << "Expected " << toRm.string()
+
57 << " to be an empty existing directory." << std::endl;
+
58 }
+
59
+
60public:
+
61 DirGuard(beast::unit_test::suite& test, path subDir, bool useCounter = true)
+
62 : subDir_(std::move(subDir)), test_(test)
+
63 {
+
64 using namespace boost::filesystem;
+
65
+
66 static auto subDirCounter = 0;
+
67 if (useCounter)
+
68 subDir_ += std::to_string(++subDirCounter);
+
69 if (!exists(subDir_))
+
70 {
+
71 create_directory(subDir_);
+
72 rmSubDir_ = true;
+
73 }
+
74 else if (is_directory(subDir_))
+
75 rmSubDir_ = false;
+
76 else
+
77 {
+
78 // Cannot run the test. Someone created a file where we want to
+
79 // put our directory
+
80 Throw<std::runtime_error>(
+
81 "Cannot create directory: " + subDir_.string());
+
82 }
+
83 }
+
84
+
85 ~DirGuard()
+
86 {
+
87 try
+
88 {
+
89 using namespace boost::filesystem;
+
90
+
91 if (rmSubDir_)
+
92 rmDir(subDir_);
+
93 }
+
94 catch (std::exception& e)
+
95 {
+
96 // if we throw here, just let it die.
+
97 test_.log << "Error in ~DirGuard: " << e.what() << std::endl;
+
98 };
+
99 }
+
100
+
101 path const&
+
102 subdir() const
+
103 {
+
104 return subDir_;
+
105 }
+
106};
+
107
+
111class FileDirGuard : public DirGuard
+
112{
+
113protected:
+
114 path const file_;
+
115 bool created_ = false;
+
116
+
117public:
+
118 FileDirGuard(
+
119 beast::unit_test::suite& test,
+
120 path subDir,
+
121 path file,
+
122 std::string const& contents,
+
123 bool useCounter = true,
+
124 bool create = true)
+
125 : DirGuard(test, subDir, useCounter)
+
126 , file_(file.is_absolute() ? file : subdir() / file)
+
127 {
+
128 if (!exists(file_))
+
129 {
+
130 if (create)
+
131 {
+
132 std::ofstream o(file_.string());
+
133 o << contents;
+
134 created_ = true;
+
135 }
+
136 }
+
137 else
+
138 {
+
139 Throw<std::runtime_error>(
+
140 "Refusing to overwrite existing file: " + file_.string());
+
141 }
+
142 }
+
143
+
144 ~FileDirGuard()
+
145 {
+
146 try
+
147 {
+
148 using namespace boost::filesystem;
+
149 if (exists(file_))
+
150 {
+
151 remove(file_);
+
152 }
+
153 else
+
154 {
+
155 if (created_)
+
156 test_.log << "Expected " << file_.string()
+
157 << " to be an existing file." << std::endl;
+
158 }
+
159 }
+
160 catch (std::exception& e)
+
161 {
+
162 // if we throw here, just let it die.
+
163 test_.log << "Error in ~FileGuard: " << e.what() << std::endl;
+
164 };
+
165 }
+
166
+
167 path const&
+
168 file() const
+
169 {
+
170 return file_;
+
171 }
+
172
+
173 bool
+
174 fileExists() const
+
175 {
+
176 return boost::filesystem::exists(file_);
+
177 }
+
178};
+
179
+
180} // namespace detail
+
181} // namespace test
+
182} // namespace ripple
+
183
+
184#endif // TEST_UNIT_TEST_DIRGUARD_H
A testsuite class.
Definition: suite.h:55
log_os< char > log
Logging output stream.
Definition: suite.h:152
-
Create a directory and remove it when it's done.
Definition: FileDirGuard.h:37
-
~DirGuard()
Definition: FileDirGuard.h:83
-
path subDir_
Definition: FileDirGuard.h:42
-
bool rmSubDir_
Definition: FileDirGuard.h:43
-
path const & subdir() const
Definition: FileDirGuard.h:100
-
DirGuard(beast::unit_test::suite &test, path subDir, bool useCounter=true)
Definition: FileDirGuard.h:59
-
auto rmDir(path const &toRm)
Definition: FileDirGuard.h:49
-
beast::unit_test::suite & test_
Definition: FileDirGuard.h:46
-
boost::filesystem::path path
Definition: FileDirGuard.h:39
-
Write a file in a directory and remove when done.
Definition: FileDirGuard.h:110
-
path const file_
Definition: FileDirGuard.h:112
-
bool created_
Definition: FileDirGuard.h:113
-
bool fileExists() const
Definition: FileDirGuard.h:172
-
path const & file() const
Definition: FileDirGuard.h:166
-
~FileDirGuard()
Definition: FileDirGuard.h:142
-
FileDirGuard(beast::unit_test::suite &test, path subDir, path file, std::string const &contents, bool useCounter=true, bool create=true)
Definition: FileDirGuard.h:116
+
Create a directory and remove it when it's done.
Definition: FileDirGuard.h:39
+
~DirGuard()
Definition: FileDirGuard.h:85
+
path subDir_
Definition: FileDirGuard.h:44
+
bool rmSubDir_
Definition: FileDirGuard.h:45
+
path const & subdir() const
Definition: FileDirGuard.h:102
+
DirGuard(beast::unit_test::suite &test, path subDir, bool useCounter=true)
Definition: FileDirGuard.h:61
+
auto rmDir(path const &toRm)
Definition: FileDirGuard.h:51
+
beast::unit_test::suite & test_
Definition: FileDirGuard.h:48
+
boost::filesystem::path path
Definition: FileDirGuard.h:41
+
Write a file in a directory and remove when done.
Definition: FileDirGuard.h:112
+
path const file_
Definition: FileDirGuard.h:114
+
bool created_
Definition: FileDirGuard.h:115
+
bool fileExists() const
Definition: FileDirGuard.h:174
+
path const & file() const
Definition: FileDirGuard.h:168
+
~FileDirGuard()
Definition: FileDirGuard.h:144
+
FileDirGuard(beast::unit_test::suite &test, path subDir, path file, std::string const &contents, bool useCounter=true, bool create=true)
Definition: FileDirGuard.h:118
Add a path.
Definition: paths.h:58
T endl(T... args)
+
Json::Value create(AccountID const &account, AccountID const &to, STAmount const &amount, NetClock::duration const &settleDelay, PublicKey const &pk, std::optional< NetClock::time_point > const &cancelAfter, std::optional< std::uint32_t > const &dstTag)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:25
STL namespace.
diff --git a/FileUtilities_8cpp_source.html b/FileUtilities_8cpp_source.html index 12dfcfc827..41e237dbcc 100644 --- a/FileUtilities_8cpp_source.html +++ b/FileUtilities_8cpp_source.html @@ -106,92 +106,98 @@ $(function() {
28
29#include <cerrno>
30#include <cstddef>
-
31#include <ios>
-
32#include <iterator>
-
33#include <optional>
-
34#include <string>
-
35
-
36namespace ripple {
-
37
-
38std::string
-
39getFileContents(
-
40 boost::system::error_code& ec,
-
41 boost::filesystem::path const& sourcePath,
-
42 std::optional<std::size_t> maxSize)
-
43{
-
44 using namespace boost::filesystem;
-
45 using namespace boost::system::errc;
-
46
-
47 path fullPath{canonical(sourcePath, ec)};
-
48 if (ec)
-
49 return {};
-
50
-
51 if (maxSize && (file_size(fullPath, ec) > *maxSize || ec))
-
52 {
-
53 if (!ec)
-
54 ec = make_error_code(file_too_large);
-
55 return {};
-
56 }
-
57
-
58 ifstream fileStream(fullPath, std::ios::in);
-
59
-
60 if (!fileStream)
-
61 {
-
62 ec = make_error_code(static_cast<errc_t>(errno));
-
63 return {};
-
64 }
-
65
-
66 std::string const result{
-
67 std::istreambuf_iterator<char>{fileStream},
-
68 std::istreambuf_iterator<char>{}};
-
69
-
70 if (fileStream.bad())
-
71 {
-
72 ec = make_error_code(static_cast<errc_t>(errno));
-
73 return {};
-
74 }
-
75
-
76 return result;
-
77}
-
78
-
79void
-
80writeFileContents(
-
81 boost::system::error_code& ec,
-
82 boost::filesystem::path const& destPath,
-
83 std::string const& contents)
-
84{
-
85 using namespace boost::filesystem;
-
86 using namespace boost::system::errc;
-
87
-
88 ofstream fileStream(destPath, std::ios::out | std::ios::trunc);
-
89
-
90 if (!fileStream)
-
91 {
-
92 ec = make_error_code(static_cast<errc_t>(errno));
-
93 return;
-
94 }
-
95
-
96 fileStream << contents;
+
31#include <fstream>
+
32#include <ios>
+
33#include <iterator>
+
34#include <optional>
+
35#include <string>
+
36
+
37namespace ripple {
+
38
+
39std::string
+
40getFileContents(
+
41 boost::system::error_code& ec,
+
42 boost::filesystem::path const& sourcePath,
+
43 std::optional<std::size_t> maxSize)
+
44{
+
45 using namespace boost::filesystem;
+
46 using namespace boost::system::errc;
+
47
+
48 path fullPath{canonical(sourcePath, ec)};
+
49 if (ec)
+
50 return {};
+
51
+
52 if (maxSize && (file_size(fullPath, ec) > *maxSize || ec))
+
53 {
+
54 if (!ec)
+
55 ec = make_error_code(file_too_large);
+
56 return {};
+
57 }
+
58
+
59 std::ifstream fileStream(fullPath.string(), std::ios::in);
+
60
+
61 if (!fileStream)
+
62 {
+
63 ec = make_error_code(static_cast<errc_t>(errno));
+
64 return {};
+
65 }
+
66
+
67 std::string const result{
+
68 std::istreambuf_iterator<char>{fileStream},
+
69 std::istreambuf_iterator<char>{}};
+
70
+
71 if (fileStream.bad())
+
72 {
+
73 ec = make_error_code(static_cast<errc_t>(errno));
+
74 return {};
+
75 }
+
76
+
77 return result;
+
78}
+
79
+
80void
+
81writeFileContents(
+
82 boost::system::error_code& ec,
+
83 boost::filesystem::path const& destPath,
+
84 std::string const& contents)
+
85{
+
86 using namespace boost::filesystem;
+
87 using namespace boost::system::errc;
+
88
+
89 std::ofstream fileStream(
+
90 destPath.string(), std::ios::out | std::ios::trunc);
+
91
+
92 if (!fileStream)
+
93 {
+
94 ec = make_error_code(static_cast<errc_t>(errno));
+
95 return;
+
96 }
97
-
98 if (fileStream.bad())
-
99 {
-
100 ec = make_error_code(static_cast<errc_t>(errno));
-
101 return;
-
102 }
-
103}
-
104
-
105} // namespace ripple
+
98 fileStream << contents;
+
99
+
100 if (fileStream.bad())
+
101 {
+
102 ec = make_error_code(static_cast<errc_t>(errno));
+
103 return;
+
104 }
+
105}
+
106
+
107} // namespace ripple
+
T bad(T... args)
+
+
+
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:25
@ canonical
std::error_code make_error_code(ripple::TokenCodecErrc e)
Definition: token_errors.h:97
-
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
-
void writeFileContents(boost::system::error_code &ec, boost::filesystem::path const &destPath, std::string const &contents)
+
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
+
void writeFileContents(boost::system::error_code &ec, boost::filesystem::path const &destPath, std::string const &contents)
diff --git a/FileUtilities_8h_source.html b/FileUtilities_8h_source.html index d40e6ebfec..ffa0913816 100644 --- a/FileUtilities_8h_source.html +++ b/FileUtilities_8h_source.html @@ -122,8 +122,8 @@ $(function() {
44#endif
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:25
-
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
-
void writeFileContents(boost::system::error_code &ec, boost::filesystem::path const &destPath, std::string const &contents)
+
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
+
void writeFileContents(boost::system::error_code &ec, boost::filesystem::path const &destPath, std::string const &contents)
diff --git a/FileUtilities__test_8cpp_source.html b/FileUtilities__test_8cpp_source.html index d879a209b7..bf065dadee 100644 --- a/FileUtilities__test_8cpp_source.html +++ b/FileUtilities__test_8cpp_source.html @@ -164,14 +164,14 @@ $(function() {
void testGetFileContents()
void run() override
Runs the suite.
-
Write a file in a directory and remove when done.
Definition: FileDirGuard.h:110
-
path const & file() const
Definition: FileDirGuard.h:166
+
Write a file in a directory and remove when done.
Definition: FileDirGuard.h:112
+
path const & file() const
Definition: FileDirGuard.h:168
Add a path.
Definition: paths.h:58
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:25
constexpr auto kilobytes(T value) noexcept
Definition: ByteUtilities.h:27
-
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
-
void writeFileContents(boost::system::error_code &ec, boost::filesystem::path const &destPath, std::string const &contents)
+
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
+
void writeFileContents(boost::system::error_code &ec, boost::filesystem::path const &destPath, std::string const &contents)