Replace includes of boost/filesystem.h with fs.h

This is step one in abstracting the use of boost::filesystem.
This commit is contained in:
Wladimir J. van der Laan 2017-03-01 15:54:22 +00:00
parent 19e36bbef6
commit 7d5172d354
27 changed files with 28 additions and 37 deletions

View file

@ -8,13 +8,13 @@
#include "addrman.h" #include "addrman.h"
#include "chainparams.h" #include "chainparams.h"
#include "clientversion.h" #include "clientversion.h"
#include "fs.h"
#include "hash.h" #include "hash.h"
#include "random.h" #include "random.h"
#include "streams.h" #include "streams.h"
#include "tinyformat.h" #include "tinyformat.h"
#include "util.h" #include "util.h"
#include <boost/filesystem.hpp>
CBanDB::CBanDB() CBanDB::CBanDB()
{ {

View file

@ -6,11 +6,11 @@
#ifndef BITCOIN_ADDRDB_H #ifndef BITCOIN_ADDRDB_H
#define BITCOIN_ADDRDB_H #define BITCOIN_ADDRDB_H
#include "fs.h"
#include "serialize.h" #include "serialize.h"
#include <string> #include <string>
#include <map> #include <map>
#include <boost/filesystem/path.hpp>
class CSubNet; class CSubNet;
class CAddrMan; class CAddrMan;

View file

@ -9,12 +9,12 @@
#include "chainparamsbase.h" #include "chainparamsbase.h"
#include "clientversion.h" #include "clientversion.h"
#include "fs.h"
#include "rpc/client.h" #include "rpc/client.h"
#include "rpc/protocol.h" #include "rpc/protocol.h"
#include "util.h" #include "util.h"
#include "utilstrencodings.h" #include "utilstrencodings.h"
#include <boost/filesystem/operations.hpp>
#include <stdio.h> #include <stdio.h>
#include <event2/buffer.h> #include <event2/buffer.h>

View file

@ -10,6 +10,7 @@
#include "chainparams.h" #include "chainparams.h"
#include "clientversion.h" #include "clientversion.h"
#include "compat.h" #include "compat.h"
#include "fs.h"
#include "rpc/server.h" #include "rpc/server.h"
#include "init.h" #include "init.h"
#include "noui.h" #include "noui.h"
@ -20,7 +21,6 @@
#include "utilstrencodings.h" #include "utilstrencodings.h"
#include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <stdio.h> #include <stdio.h>

View file

@ -4,11 +4,10 @@
#include "dbwrapper.h" #include "dbwrapper.h"
#include "fs.h"
#include "util.h" #include "util.h"
#include "random.h" #include "random.h"
#include <boost/filesystem.hpp>
#include <leveldb/cache.h> #include <leveldb/cache.h>
#include <leveldb/env.h> #include <leveldb/env.h>
#include <leveldb/filter_policy.h> #include <leveldb/filter_policy.h>

View file

@ -6,14 +6,13 @@
#define BITCOIN_DBWRAPPER_H #define BITCOIN_DBWRAPPER_H
#include "clientversion.h" #include "clientversion.h"
#include "fs.h"
#include "serialize.h" #include "serialize.h"
#include "streams.h" #include "streams.h"
#include "util.h" #include "util.h"
#include "utilstrencodings.h" #include "utilstrencodings.h"
#include "version.h" #include "version.h"
#include <boost/filesystem/path.hpp>
#include <leveldb/db.h> #include <leveldb/db.h>
#include <leveldb/write_batch.h> #include <leveldb/write_batch.h>

View file

@ -16,6 +16,7 @@
#include "checkpoints.h" #include "checkpoints.h"
#include "compat/sanity.h" #include "compat/sanity.h"
#include "consensus/validation.h" #include "consensus/validation.h"
#include "fs.h"
#include "httpserver.h" #include "httpserver.h"
#include "httprpc.h" #include "httprpc.h"
#include "key.h" #include "key.h"
@ -56,7 +57,6 @@
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/split.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/function.hpp> #include <boost/function.hpp>
#include <boost/interprocess/sync/file_lock.hpp> #include <boost/interprocess/sync/file_lock.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>

View file

@ -11,6 +11,7 @@
#include "amount.h" #include "amount.h"
#include "bloom.h" #include "bloom.h"
#include "compat.h" #include "compat.h"
#include "fs.h"
#include "hash.h" #include "hash.h"
#include "limitedmap.h" #include "limitedmap.h"
#include "netaddress.h" #include "netaddress.h"
@ -32,7 +33,6 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#endif #endif
#include <boost/filesystem/path.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/signals2/signal.hpp> #include <boost/signals2/signal.hpp>

View file

@ -10,6 +10,7 @@
#include "chainparams.h" #include "chainparams.h"
#include "clientmodel.h" #include "clientmodel.h"
#include "fs.h"
#include "guiconstants.h" #include "guiconstants.h"
#include "guiutil.h" #include "guiutil.h"
#include "intro.h" #include "intro.h"
@ -38,7 +39,6 @@
#include <stdint.h> #include <stdint.h>
#include <boost/filesystem/operations.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <QApplication> #include <QApplication>

View file

@ -9,6 +9,7 @@
#include "qvalidatedlineedit.h" #include "qvalidatedlineedit.h"
#include "walletmodel.h" #include "walletmodel.h"
#include "fs.h"
#include "primitives/transaction.h" #include "primitives/transaction.h"
#include "init.h" #include "init.h"
#include "policy/policy.h" #include "policy/policy.h"
@ -35,9 +36,6 @@
#include "shlwapi.h" #include "shlwapi.h"
#endif #endif
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
#include <boost/scoped_array.hpp> #include <boost/scoped_array.hpp>
#include <QAbstractItemView> #include <QAbstractItemView>

View file

@ -6,6 +6,7 @@
#define BITCOIN_QT_GUIUTIL_H #define BITCOIN_QT_GUIUTIL_H
#include "amount.h" #include "amount.h"
#include "fs.h"
#include <QEvent> #include <QEvent>
#include <QHeaderView> #include <QHeaderView>
@ -16,8 +17,6 @@
#include <QTableView> #include <QTableView>
#include <QLabel> #include <QLabel>
#include <boost/filesystem.hpp>
class QValidatedLineEdit; class QValidatedLineEdit;
class SendCoinsRecipient; class SendCoinsRecipient;

View file

@ -6,6 +6,7 @@
#include "config/bitcoin-config.h" #include "config/bitcoin-config.h"
#endif #endif
#include "fs.h"
#include "intro.h" #include "intro.h"
#include "ui_intro.h" #include "ui_intro.h"
@ -13,8 +14,6 @@
#include "util.h" #include "util.h"
#include <boost/filesystem.hpp>
#include <QFileDialog> #include <QFileDialog>
#include <QSettings> #include <QSettings>
#include <QMessageBox> #include <QMessageBox>

View file

@ -6,6 +6,7 @@
#include "chainparams.h" #include "chainparams.h"
#include "consensus/validation.h" #include "consensus/validation.h"
#include "fs.h"
#include "validation.h" #include "validation.h"
#include "rpc/register.h" #include "rpc/register.h"
#include "rpc/server.h" #include "rpc/server.h"
@ -17,8 +18,6 @@
#include <QDir> #include <QDir>
#include <QtGlobal> #include <QtGlobal>
#include <boost/filesystem.hpp>
static UniValue rpcNestedTest_rpc(const JSONRPCRequest& request) static UniValue rpcNestedTest_rpc(const JSONRPCRequest& request)
{ {
if (request.fHelp) { if (request.fHelp) {

View file

@ -6,11 +6,12 @@
#ifndef BITCOIN_RPCPROTOCOL_H #ifndef BITCOIN_RPCPROTOCOL_H
#define BITCOIN_RPCPROTOCOL_H #define BITCOIN_RPCPROTOCOL_H
#include "fs.h"
#include <list> #include <list>
#include <map> #include <map>
#include <stdint.h> #include <stdint.h>
#include <string> #include <string>
#include <boost/filesystem.hpp>
#include <univalue.h> #include <univalue.h>

View file

@ -6,6 +6,7 @@
#include "rpc/server.h" #include "rpc/server.h"
#include "base58.h" #include "base58.h"
#include "fs.h"
#include "init.h" #include "init.h"
#include "random.h" #include "random.h"
#include "sync.h" #include "sync.h"
@ -16,7 +17,6 @@
#include <univalue.h> #include <univalue.h>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/signals2/signal.hpp> #include <boost/signals2/signal.hpp>

View file

@ -7,6 +7,7 @@
#include "chainparams.h" #include "chainparams.h"
#include "consensus/consensus.h" #include "consensus/consensus.h"
#include "consensus/validation.h" #include "consensus/validation.h"
#include "fs.h"
#include "key.h" #include "key.h"
#include "validation.h" #include "validation.h"
#include "miner.h" #include "miner.h"
@ -24,7 +25,6 @@
#include <memory> #include <memory>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
FastRandomContext insecure_rand_ctx(true); FastRandomContext insecure_rand_ctx(true);

View file

@ -6,12 +6,12 @@
#define BITCOIN_TEST_TEST_BITCOIN_H #define BITCOIN_TEST_TEST_BITCOIN_H
#include "chainparamsbase.h" #include "chainparamsbase.h"
#include "fs.h"
#include "key.h" #include "key.h"
#include "pubkey.h" #include "pubkey.h"
#include "txdb.h" #include "txdb.h"
#include "txmempool.h" #include "txmempool.h"
#include <boost/filesystem.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
/** Basic testing setup. /** Basic testing setup.

View file

@ -8,7 +8,7 @@
#include <shlobj.h> #include <shlobj.h>
#endif #endif
#include <boost/filesystem.hpp> #include "fs.h"
boost::filesystem::path GetTempPath() { boost::filesystem::path GetTempPath() {
return boost::filesystem::temp_directory_path(); return boost::filesystem::temp_directory_path();

View file

@ -8,7 +8,7 @@
#ifndef BITCOIN_TEST_TESTUTIL_H #ifndef BITCOIN_TEST_TESTUTIL_H
#define BITCOIN_TEST_TESTUTIL_H #define BITCOIN_TEST_TESTUTIL_H
#include <boost/filesystem/path.hpp> #include "fs.h"
boost::filesystem::path GetTempPath(); boost::filesystem::path GetTempPath();

View file

@ -10,6 +10,7 @@
#include "util.h" #include "util.h"
#include "chainparamsbase.h" #include "chainparamsbase.h"
#include "fs.h"
#include "random.h" #include "random.h"
#include "serialize.h" #include "serialize.h"
#include "sync.h" #include "sync.h"
@ -79,8 +80,6 @@
#include <boost/algorithm/string/case_conv.hpp> // for to_lower() #include <boost/algorithm/string/case_conv.hpp> // for to_lower()
#include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith() #include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/program_options/detail/config_file.hpp> #include <boost/program_options/detail/config_file.hpp>
#include <boost/program_options/parsers.hpp> #include <boost/program_options/parsers.hpp>

View file

@ -15,6 +15,7 @@
#endif #endif
#include "compat.h" #include "compat.h"
#include "fs.h"
#include "tinyformat.h" #include "tinyformat.h"
#include "utiltime.h" #include "utiltime.h"
@ -25,7 +26,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/filesystem/path.hpp>
#include <boost/signals2/signal.hpp> #include <boost/signals2/signal.hpp>
#include <boost/thread/exceptions.hpp> #include <boost/thread/exceptions.hpp>

View file

@ -12,6 +12,7 @@
#include "consensus/consensus.h" #include "consensus/consensus.h"
#include "consensus/merkle.h" #include "consensus/merkle.h"
#include "consensus/validation.h" #include "consensus/validation.h"
#include "fs.h"
#include "hash.h" #include "hash.h"
#include "init.h" #include "init.h"
#include "policy/fees.h" #include "policy/fees.h"
@ -41,8 +42,6 @@
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/join.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/math/distributions/poisson.hpp> #include <boost/math/distributions/poisson.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>

View file

@ -13,6 +13,7 @@
#include "amount.h" #include "amount.h"
#include "chain.h" #include "chain.h"
#include "coins.h" #include "coins.h"
#include "fs.h"
#include "protocol.h" // For CMessageHeader::MessageStartChars #include "protocol.h" // For CMessageHeader::MessageStartChars
#include "script/script_error.h" #include "script/script_error.h"
#include "sync.h" #include "sync.h"
@ -30,7 +31,6 @@
#include <atomic> #include <atomic>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
#include <boost/filesystem/path.hpp>
class CBlockIndex; class CBlockIndex;
class CBlockTreeDB; class CBlockTreeDB;

View file

@ -6,6 +6,7 @@
#include "db.h" #include "db.h"
#include "addrman.h" #include "addrman.h"
#include "fs.h"
#include "hash.h" #include "hash.h"
#include "protocol.h" #include "protocol.h"
#include "util.h" #include "util.h"
@ -17,7 +18,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <boost/version.hpp> #include <boost/version.hpp>

View file

@ -7,6 +7,7 @@
#define BITCOIN_WALLET_DB_H #define BITCOIN_WALLET_DB_H
#include "clientversion.h" #include "clientversion.h"
#include "fs.h"
#include "serialize.h" #include "serialize.h"
#include "streams.h" #include "streams.h"
#include "sync.h" #include "sync.h"
@ -16,8 +17,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/filesystem/path.hpp>
#include <db_cxx.h> #include <db_cxx.h>
static const unsigned int DEFAULT_WALLET_DBLOGSIZE = 100; static const unsigned int DEFAULT_WALLET_DBLOGSIZE = 100;

View file

@ -11,6 +11,7 @@
#include "wallet/coincontrol.h" #include "wallet/coincontrol.h"
#include "consensus/consensus.h" #include "consensus/consensus.h"
#include "consensus/validation.h" #include "consensus/validation.h"
#include "fs.h"
#include "key.h" #include "key.h"
#include "keystore.h" #include "keystore.h"
#include "validation.h" #include "validation.h"
@ -30,7 +31,6 @@
#include <assert.h> #include <assert.h>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
CWallet* pwalletMain = NULL; CWallet* pwalletMain = NULL;

View file

@ -7,6 +7,7 @@
#include "base58.h" #include "base58.h"
#include "consensus/validation.h" #include "consensus/validation.h"
#include "fs.h"
#include "validation.h" // For CheckTransaction #include "validation.h" // For CheckTransaction
#include "protocol.h" #include "protocol.h"
#include "serialize.h" #include "serialize.h"
@ -18,7 +19,6 @@
#include <atomic> #include <atomic>
#include <boost/version.hpp> #include <boost/version.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>