| 63 | } |
| 64 | |
| 65 | Filesystem_Stream::OutputStream Filesystem::OpenOutputStream(std::string_view name, std::ios_base::openmode m) const { |
| 66 | if (name.empty()) { |
| 67 | return Filesystem_Stream::OutputStream(); |
| 68 | } |
| 69 | |
| 70 | std::streambuf* buf = CreateOutputStreambuffer(name, m | std::ios_base::out); |
| 71 | |
| 72 | if (!buf) { |
| 73 | return Filesystem_Stream::OutputStream(); |
| 74 | } |
| 75 | |
| 76 | std::string path; |
| 77 | std::tie(path, std::ignore) = FileFinder::GetPathAndFilename(name); |
| 78 | Filesystem_Stream::OutputStream os(buf, Subtree(path), ToString(name)); |
| 79 | |
| 80 | return os; |
| 81 | } |
| 82 | |
| 83 | void Filesystem::ClearCache(std::string_view path) const { |
| 84 | tree->ClearCache(path); |
no test coverage detected