| #include <FileHandle.hpp> |
| FileHandle::FileHandle(const std::filesystem::path& name, |
| std::ios_base::openmode mode) : |
| // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg) |
| fd(open(name.c_str(), mode)) |
| throw std::out_of_range(name.string() + " failed to open"); |
| FileHandle::FileHandle(int fdIn) : fd(fdIn){}; |
| FileHandle::FileHandle(FileHandle&& in) noexcept : fd(in.fd) |
| FileHandle& FileHandle::operator=(FileHandle&& in) noexcept |
| FileHandle::~FileHandle() |
| std::cerr << "Failed to close fd " << std::to_string(fd); |
| int FileHandle::handle() const |