# std.tar make iterator interface more ergonomic · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/614161a7cf65f46cb3e2461ffe2e09d972508a97)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 614161a7cf65f46cb3e2461ffe2e09d972508a97

Requested commit: 614161a7cf65f46cb3e2461ffe2e09d972508a97

Commit: 614161a7cf65f46cb3e2461ffe2e09d972508a97

Tree: e421443136c21a1b24da91c18d76ece3194f00c9

Author: Igor Anić

Committer: Igor Anić

## Message

```
std.tar make iterator interface more ergonomic

for the then end users:

1. Don't require user to call file.skip() on file returned from
iterator.next if file is not read. Iterator will now handle this.
Previously that returned header parsing error, without knowing some tar
internals it is hard to understand what is required from user.

2. Use iterator.File.kind enum which is similar to fs.File.Kind,
something familiar. Internal Header.Kind has many types which are not
exposed but the user needs to have else in kind switch to cover those
cases.

3. Add reader interface to the iterator.File.

```

## Parents

- [5ccbb196ad08fd5e58fc8874917a20f9a220d729](https://git.cafe/gitcafe/zig/commit/5ccbb196ad08fd5e58fc8874917a20f9a220d729?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/614161a7cf65f46cb3e2461ffe2e09d972508a97?format=markdown)
