# Refactor PreopenList.find\(\) · gitcafe/zig

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

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

Visibility: public

Requested revision: 66e5205047576768f075ec8f016f6fe21ce71bd0

Requested commit: 66e5205047576768f075ec8f016f6fe21ce71bd0

Commit: 66e5205047576768f075ec8f016f6fe21ce71bd0

Tree: 2456fd5d749907879298e1faea90b779d0c0b370

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
Refactor PreopenList.find()

This commit generalizes `std.fs.wasi.PreopenList.find(...)` allowing
search by `std.fs.wasi.PreopenType` union type rather than by dir
name. In the future releases of WASI, it is expected to have more
preopen types (or capabilities) than just directories. This commit
aligns itself with that vision.

This is a potentially breaking change. However, since `std.fs.wasi.PreopenList`
wasn't made part of any Zig release yet, I think we should be OK
to introduce those changes without pointing to any deprecations.

```

## Parents

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

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