Skip to content

Add synchronous file I/O #270

@sgerbino

Description

@sgerbino

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions