Capy defines stream concepts that algorithms can target generically — JSON serialization, hashing, framing, compression, anything that reads or writes bytes. Today those algorithms can be wired up to sockets (via corosio), to memory buffers, or to user-supplied stream types, but not to a file, because Capy ships no file type.
A user writing a generic algorithm against Capy's stream concepts should be able to point it at a file. Without a built-in file type, they have to either pull in corosio's async file types or write their own concept-conforming wrapper around std::fstream.
This issue tracks adding a synchronous file type that satisfies Capy's existing stream concepts, so that any algorithm written against those concepts works with files.
A draft documentation page already exists at doc/unlisted/utilities-file-io.adoc describing the intended shape; it should be moved out of unlisted/ once the implementation lands.
Capy defines stream concepts that algorithms can target generically — JSON serialization, hashing, framing, compression, anything that reads or writes bytes. Today those algorithms can be wired up to sockets (via corosio), to memory buffers, or to user-supplied stream types, but not to a file, because Capy ships no file type.
A user writing a generic algorithm against Capy's stream concepts should be able to point it at a file. Without a built-in file type, they have to either pull in corosio's async file types or write their own concept-conforming wrapper around
std::fstream.This issue tracks adding a synchronous file type that satisfies Capy's existing stream concepts, so that any algorithm written against those concepts works with files.
A draft documentation page already exists at
doc/unlisted/utilities-file-io.adocdescribing the intended shape; it should be moved out ofunlisted/once the implementation lands.