Skip to content

Convert ReadSubjectFile to a FS #131

@MattWindsor91

Description

@MattWindsor91

ReadSubjectFile is a function that does not spark joy. It is intended to behave like a call to os.Open, except that, in certain cases, it can traverse inside a tarball and pretend that tarball is transparently part of the filesystem. Its main reason for existence is to deal with the fact that plans can refer to files that only exist inside tarred snapshots of failed tests.

This feels like a useful example of where go1.16's FS could be useful: we can write a FS that behaves like a real filesystem most of the time but, if asked to go into a directory that is actually a tarball, delegates to something like tarfs instead.

In fact, we could probably replace current read-only uses of tarballs with such an FS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions