| 49 | return tmp; |
| 50 | } |
| 51 | TempFile TempFile::AdoptExisting(const std::filesystem::path& path) |
| 52 | { |
| 53 | TempFile tmp; |
| 54 | tmp.path_ = path; |
| 55 | // make sure actually exists |
| 56 | if (!fs::exists(tmp.path_)) { |
| 57 | throw Except<Exception>("Temp file adoption failed: does not exist"); |
| 58 | } |
| 59 | return tmp; |
| 60 | } |
| 61 | TempFile& TempFile::MoveTo(const std::filesystem::path& dest) |
| 62 | { |
| 63 | if (Empty()) { |
nothing calls this directly
no outgoing calls
no test coverage detected