FileReader opening backup files (UTF-8 abs path) via FSStream for the send.
| 261 | |
| 262 | // FileReader opening backup files (UTF-8 abs path) via FSStream for the send. |
| 263 | struct FsFileReader : TransferProto::FileReader { |
| 264 | std::optional<FSStream> stream; |
| 265 | bool open(const std::string& absPath) override |
| 266 | { |
| 267 | stream.emplace(Archive::sdmc(), StringUtils::UTF8toUTF16(absPath.c_str()), FS_OPEN_READ); |
| 268 | return stream->good(); |
| 269 | } |
| 270 | size_t read(void* dst, size_t n) override { return stream ? stream->read(dst, (u32)n) : 0; } |
| 271 | void close() override |
| 272 | { |
| 273 | if (stream) { |
| 274 | stream->close(); |
| 275 | stream.reset(); |
| 276 | } |
| 277 | } |
| 278 | }; |
| 279 | |
| 280 | Server::HttpResponse handleInfo(const std::string&, const std::string&) |
| 281 | { |
nothing calls this directly
no outgoing calls
no test coverage detected