# breaking changes to std.fs, std.os · gitcafe/zig

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

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

Visibility: public

Requested revision: 4a67dd04c99954af2fd8e38b99704a1faea16267

Requested commit: 4a67dd04c99954af2fd8e38b99704a1faea16267

Commit: 4a67dd04c99954af2fd8e38b99704a1faea16267

Tree: c9d66453e4e5bb0a9814db1f2ab5502bc3628207

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
breaking changes to std.fs, std.os

 * improve `std.fs.AtomicFile` to use sendfile()
   - also fix AtomicFile cleanup not destroying tmp files under some
     error conditions
 * improve `std.fs.updateFile` to take advantage of the new `makePath`
   which no longer needs an Allocator.
 * rename std.fs.makeDir to std.fs.makeDirAbsolute
 * rename std.fs.Dir.makeDirC to std.fs.Dir.makeDirZ
 * add std.fs.Dir.makeDirW and provide Windows implementation of
   std.os.mkdirat. std.os.windows.CreateDirectory is now implemented
   by calling ntdll, supports an optional root directory handle,
   and returns an open directory handle. Its error set has a few more
   errors in it.
 * rename std.fs.Dir.changeTo to std.fs.Dir.setAsCwd
 * fix std.fs.File.writevAll and related functions when len 0 iovecs
   supplied.
 * introduce `std.fs.File.writeFileAll`, exposing a convenient
   cross-platform API on top of sendfile().
 * `NoDevice` added to std.os.MakeDirError error set.
 * std.os.fchdir gets a smaller error set.
 * std.os.windows.CloseHandle is implemented with ntdll call rather than
   kernel32.

```

## Parents

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

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