# std.fs.File.writeFileAll: support unseekable files · gitcafe/zig

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

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

Visibility: public

Requested revision: ede41759be736a1c4ce2a6dbdd8f2d0b5afceb5f

Requested commit: ede41759be736a1c4ce2a6dbdd8f2d0b5afceb5f

Commit: ede41759be736a1c4ce2a6dbdd8f2d0b5afceb5f

Tree: 76107a498ce75f89ba4d3f514b1af1afd089de35

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.fs.File.writeFileAll: support unseekable files

With this commit, the function tries to use more efficient syscalls, and
then falls back to non-positional reads.

The motivating use case for this change is to support something like the
following:

try io.getStdOut().writeFileAll(dest_file, .{});

```

## Parents

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

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