| 35 | }; |
| 36 | |
| 37 | Filesystem_Stream::InputStream Filesystem::OpenInputStream(std::string_view name, std::ios_base::openmode m) const { |
| 38 | if (name.empty()) { |
| 39 | return Filesystem_Stream::InputStream(); |
| 40 | } |
| 41 | |
| 42 | std::streambuf* buf = CreateInputStreambuffer(name, m | std::ios_base::in); |
| 43 | |
| 44 | if (!buf) { |
| 45 | return Filesystem_Stream::InputStream(); |
| 46 | } |
| 47 | |
| 48 | Filesystem_Stream::InputStream is(buf, ToString(name)); |
| 49 | return is; |
| 50 | } |
| 51 | |
| 52 | Filesystem_Stream::InputStream Filesystem::OpenOrCreateInputStream(std::string_view name, std::ios_base::openmode m) const { |
| 53 | auto is = OpenInputStream(name, m); |
no test coverage detected