diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-06-20 18:27:37 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-06-20 18:27:37 -0400 |
| commit | d87cd06296a759ce398b50a437b8a1444413c6be (patch) | |
| tree | a644b31ed378efd2549c6e05506ac30095de860b /lib/std/array_list_sentineled.zig | |
| parent | bc0ca73887d12ff71e12ad473bab22631a29b1aa (diff) | |
| download | zig-d87cd06296a759ce398b50a437b8a1444413c6be.tar.gz zig-d87cd06296a759ce398b50a437b8a1444413c6be.zip | |
rework zig fmt to use less syscalls and open fds
* `std.fs.Dir.Entry.Kind` is moved to `std.fs.File.Kind`
* `std.fs.File.Stat` gains the `kind` field, so performing a stat() on
a File now tells what kind of file it is. On Windows this only will
distinguish between directories and files.
* rework zig fmt logic so that in the case of opening a file and
discovering it to be a directory, it closes the file descriptor
before re-opening it with O_DIRECTORY, using fewer simultaneous open
file descriptors when walking a directory tree.
* rework zig fmt logic so that it pays attention to the kind of
directory entries, and when it sees a sub-directory it attempts to
open it as a directory rather than a file, reducing the number of
open() syscalls when walking a directory tree.
Diffstat (limited to 'lib/std/array_list_sentineled.zig')
0 files changed, 0 insertions, 0 deletions
