# \(breaking\) clarify openDir API · gitcafe/zig

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

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

Visibility: public

Requested revision: 27affde592653ac7f92489cec404b4bf3e0d1b29

Requested commit: 27affde592653ac7f92489cec404b4bf3e0d1b29

Commit: 27affde592653ac7f92489cec404b4bf3e0d1b29

Tree: d563a351e3cf7656471f50cd5112b790d2c6233e

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
(breaking) clarify openDir API

 * remove deprecated `std.fs.Dir` APIs
 * `std.fs.Dir.openDir` now takes a options struct with bool fields for
   `access_sub_paths` and `iterate`. It's now much more clear how
   opening directories works.
 * fixed the std lib and various zig code calling the wrong openDir
   function.
 * the runtime safety check for dir flags is removed in favor of the
   cheaper option of putting a comment on the same line as handling
   EBADF / ACCESS_DENIED, since that will show up in stack traces.

```

## Parents

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

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