Tomáš Pecka | 9b1c967 | 2020-11-11 15:24:06 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | #include <filesystem> |
| 3 | #include <string> |
| 4 | |
| 5 | /** @short Represents a temporary file whose lifetime is bound by lifetime of the FileInjector instance */ |
| 6 | class FileInjector { |
| 7 | private: |
| 8 | const std::string path; |
| 9 | |
| 10 | public: |
| 11 | FileInjector(const std::filesystem::path& path, const std::filesystem::perms permissions, const std::string& content); |
| 12 | ~FileInjector() noexcept(false); |
| 13 | void setPermissions(const std::filesystem::perms permissions); |
| 14 | }; |