Skip to content

Allow early termination after n files have been extracted #134

@jamesrhester

Description

@jamesrhester

GNU Tar has an --occurrence option which allows tar to terminate early after n occurrences of the file have been extracted. Something similar would be useful for Julia Tar so that time and bytes can be saved when only a part of the archive is needed.

I've tried using the predicate function to recreate this functionality by closing the io stream once the next header after the extracted file is being processed, but the error caused by the premature closing of the stream can lead to the extracted file not being written to disk before everything is torn down (or at least the extracted file is missing, I assume this is the reason).

An alternative solution would be to expose the io stream for the extracted file so that it could be explicitly flushed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions