# std.fs.File.Writer: break up seekTo · gitcafe/zig

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

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

Visibility: public

Requested revision: f78f70dbd858536fd1a1ce0a1706ac259bcdf538

Requested commit: f78f70dbd858536fd1a1ce0a1706ac259bcdf538

Commit: f78f70dbd858536fd1a1ce0a1706ac259bcdf538

Tree: d5381db76b31cf1ab2620555a37484453efae8b0

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.fs.File.Writer: break up seekTo

- introduce seekToUnbuffered which asserts no buffered data and does not
  have WriteFailed in the error set
- remove WriteFailed from SeekError
- make seekTo based on calling flush and then seekToUnbuffered
- revert the change to reset seek_err since the error sets are
  compatible again

```

## Parents

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

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