# tweak std.io.Writer and followups · gitcafe/zig

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

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

Visibility: public

Requested revision: 1164d5ece5b12b573c6501c94b9ad9e326199ba9

Requested commit: 1164d5ece5b12b573c6501c94b9ad9e326199ba9

Commit: 1164d5ece5b12b573c6501c94b9ad9e326199ba9

Tree: ce3d85d2a8fa90930f93e0c97835e40bece10ce9

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
tweak std.io.Writer and followups

remove std.fs.Dir.readFileAllocOptions, replace with more flexible API
readFileIntoArrayList

remove std.fs.File.readToEndAllocOptions, replace with more flexible API
readIntoArrayList

update std.fs.File to new reader/writer API

add helper functions to std.io.Reader.Limit

replace std.io.Writer.FileLen with std.io.Reader.Limit

make offset a type rather than u64 so that it can distinguish between
streaming read and positional read

avoid an unnecessary allocation in std.zig.readSourceFileToEndAlloc when
there is a UTF-16 little endian BOM.

```

## Parents

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

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