Skip to content

Segmenting the interface #177

@asinghvi17

Description

@asinghvi17

There seem to be three principal modes with which people access data in files:

  1. Reading (this is pure reading, maybe you want to read some specific byte range or read incrementally)
  2. Writing (specifically writing to a single file)
  3. Examining file structure (ls, joinpath, du, etc)
  4. Manipulating structure (mv, tempdir, etc)

As far as I can tell, the FilePathsBase API doesn't currently make a formal distinction between these three APIs. Would it make sense to do so?

This way, things like HTTP paths can simply opt in to the pure-reading interface, whereas a local path could also implement the writing and manipulating interfaces. We can then also have nice interface tests for that, and it would probably make it conceptually easier to implement random filesystems, like zip files (which wouldn't support a tempdir, for example).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions