# fileRead functions: handle INVALID_FUNCTION on Windows and map it to error.IsDir · gitcafe/zig

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

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

Visibility: public

Requested revision: b4831403c929d429c7710d5004ec32fd0dfbd0a4

Requested commit: b4831403c929d429c7710d5004ec32fd0dfbd0a4

Commit: b4831403c929d429c7710d5004ec32fd0dfbd0a4

Tree: 565fdd5440bacc37db9467df4fa1981cafabd0f5

Author: Ryan Liptak

Committer: Ryan Liptak

## Message

```
fileRead functions: handle INVALID_FUNCTION on Windows and map it to error.IsDir

INVALID_FUNCTION may be possible in other scenarios as well, but it is verifiably returned when the handle refers to a directory.

```

## Parents

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

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