-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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.