# std.Io: make file access time optional · gitcafe/zig

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

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

Visibility: public

Requested revision: a7c9d11b289b2140430f2666968bddb02a6f1a1f

Requested commit: a7c9d11b289b2140430f2666968bddb02a6f1a1f

Commit: a7c9d11b289b2140430f2666968bddb02a6f1a1f

Tree: b5b682039c0704b9beaf3f17737ab3d6962afb1a

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Io: make file access time optional

Some filesystems, such as ZFS, do not report atime. It's pretty useless
in general, so make it an optional field in File.Stat.

Also take the opportunity to make setting timestamps API more flexible
and match the APIs widely available, which have UTIME_OMIT and UTIME_NOW
constants that can be independently set for both fields.

This is needed to handle smoothly the case when atime is null.

```

## Parents

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

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