File indexing completed on 2026-10-09 08:30:26
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include <cstdio>
0012 #include <filesystem>
0013
0014 namespace ActsPlugins::detail {
0015
0016
0017 class WrappedFileHandle {
0018 public:
0019 explicit WrappedFileHandle(const std::filesystem::path& outf = "");
0020 ~WrappedFileHandle();
0021 WrappedFileHandle(const WrappedFileHandle&) = delete;
0022 WrappedFileHandle& operator=(const WrappedFileHandle&) = delete;
0023
0024 WrappedFileHandle(WrappedFileHandle&& other) noexcept;
0025
0026 WrappedFileHandle& operator=(WrappedFileHandle&& other) noexcept;
0027 FILE* operator()() const;
0028 bool isRedirected() const;
0029 const std::filesystem::path& path() const;
0030
0031 private:
0032 FILE* m_handle = nullptr;
0033 std::filesystem::path m_path{};
0034 };
0035
0036 }