Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
util
readwritefile.h
Go to the documentation of this file.
1
// Copyright (c) 2015-present The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_UTIL_READWRITEFILE_H
6
#define BITCOIN_UTIL_READWRITEFILE_H
7
8
#include <
util/fs.h
>
9
10
#include <limits>
11
#include <string>
12
#include <utility>
13
21
std::pair<bool,std::string>
ReadBinaryFile
(
const
fs::path &filename,
size_t
maxsize=std::numeric_limits<size_t>::max());
22
26
bool
WriteBinaryFile
(
const
fs::path &filename,
const
std::string &data);
27
28
#endif
// BITCOIN_UTIL_READWRITEFILE_H
fs.h
WriteBinaryFile
bool WriteBinaryFile(const fs::path &filename, const std::string &data)
Write contents of std::string to a file.
Definition
readwritefile.cpp:37
ReadBinaryFile
std::pair< bool, std::string > ReadBinaryFile(const fs::path &filename, size_t maxsize=std::numeric_limits< size_t >::max())
Read full contents of a file and return them in a std::string.
Definition
readwritefile.cpp:16
Generated on
for Bitcoin Core by
1.17.0