This repository has been archived on 2023-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2017-10-09 11:48:10 -04:00
|
|
|
#ifndef NNTPCHAN_FILE_HANDLE_HPP
|
|
|
|
|
#define NNTPCHAN_FILE_HANDLE_HPP
|
|
|
|
|
|
|
|
|
|
#include <experimental/filesystem>
|
2017-10-17 10:29:56 -04:00
|
|
|
#include <fstream>
|
|
|
|
|
#include <memory>
|
2017-10-09 11:48:10 -04:00
|
|
|
|
|
|
|
|
namespace nntpchan
|
|
|
|
|
{
|
2017-10-17 10:29:56 -04:00
|
|
|
typedef std::unique_ptr<std::fstream> FileHandle_ptr;
|
2017-10-09 11:48:10 -04:00
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
enum FileMode
|
|
|
|
|
{
|
|
|
|
|
eRead,
|
|
|
|
|
eWrite
|
|
|
|
|
};
|
2017-10-09 11:48:10 -04:00
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
namespace fs = std::experimental::filesystem;
|
|
|
|
|
|
|
|
|
|
FileHandle_ptr OpenFile(const fs::path &fname, FileMode mode);
|
2017-10-09 11:48:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|