# How to open and read a file in zig?

**URL:** <https://ziggit.dev/t/how-to-open-and-read-a-file-in-zig/13505>\
**Category:** Help\
**Tags:** language, standard-library\
**Created:** [December 14, 2025, 3:32am UTC](https://ziggit.dev/t/how-to-open-and-read-a-file-in-zig/13505 "2025-12-14T03:32:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jmctagger](https://ziggit.dev/letter_avatar_proxy/v4/letter/j/8dc957/32.png) [@jmctagger](https://ziggit.dev/u/jmctagger)\
**Post date:** [December 14, 2025, 4:06am UTC](https://ziggit.dev/t/how-to-open-and-read-a-file-in-zig/13505/4 "2025-12-14T04:06:04Z")

</div>

> [@supun](#):
>
> Io.Dir.cwd

Oh, yes, and this. It does look like you’re using master (0.16), right? In this case, I think you’ll find a lot of various “how-to” documentation out there that references the old fs.File stuff which will [soon be deprecated](https://ziggit.dev/t/fs-file-and-io-file/13362) - later, you use `std.fs.File.stdout()`, but that’s for your stdout, so that’s probably fine. Just beware that if you’re in this 0.16-forward space, then fs.File will be deprecated to io.File. Refer to the official zig documentation, which does spell out quite a lot of the Io stuff, even if verbosity might grow in time.

---

_[View the full topic](https://ziggit.dev/t/how-to-open-and-read-a-file-in-zig/13505)._
