# std.Build.Step.WriteFile: fix handling of directories · gitcafe/zig

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

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

Visibility: public

Requested revision: a966eee090d55c7d61484333af675c80115bf188

Requested commit: a966eee090d55c7d61484333af675c80115bf188

Commit: a966eee090d55c7d61484333af675c80115bf188

Tree: 9df97f8551ce59a4f163d4bd23b145c5bcb44858

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Build.Step.WriteFile: fix handling of directories

and add file system watching integration.

`addDirectoryWatchInput` now returns a `bool` which helps remind the
caller to
1. call addDirectoryWatchInputFromPath on any derived paths
2. but only if the dependency is not already captured by a step
   dependency edge.

The make function now recursively walks all directories and adds the
found files to the cache hash rather than incorrectly only adding the
directory name to the cache hash.

closes #20571

```

## Parents

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

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