10 #if defined WIN32 && defined __GLIBCXX__ 11 #include <ext/stdio_filebuf.h> 14 #include <boost/filesystem.hpp> 15 #include <boost/filesystem/fstream.hpp> 18 namespace fs = boost::filesystem;
22 FILE *
fopen(
const fs::path& p,
const char *mode);
30 explicit FileLock(
const fs::path& file);
40 void* hFile = (
void*)-1;
60 #if defined WIN32 && defined __GLIBCXX__ 65 explicit ifstream(
const fs::path& p, std::ios_base::openmode mode = std::ios_base::in) { open(p, mode); }
67 void open(
const fs::path& p, std::ios_base::openmode mode = std::ios_base::in);
68 bool is_open() {
return m_filebuf.is_open(); }
72 __gnu_cxx::stdio_filebuf<char> m_filebuf;
73 FILE* m_file =
nullptr;
79 explicit ofstream(
const fs::path& p, std::ios_base::openmode mode = std::ios_base::out) { open(p, mode); }
81 void open(
const fs::path& p, std::ios_base::openmode mode = std::ios_base::out);
82 bool is_open() {
return m_filebuf.is_open(); }
86 __gnu_cxx::stdio_filebuf<char> m_filebuf;
87 FILE* m_file =
nullptr;
89 #else // !(WIN32 && __GLIBCXX__) 92 #endif // WIN32 && __GLIBCXX__ 95 #endif // BITCOIN_FS_H FILE * fopen(const fs::path &p, const char *mode)
Filesystem operations and types.
std::string get_filesystem_error_message(const fs::filesystem_error &e)