aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fs/File.zig
AgeCommit message (Collapse)Author
2025-11-11aarch64: cleanup register lockJacob Young
2025-10-29std.Io.Threaded: add ioBasic which disables networkingAndrew Kelley
2025-10-29std.Io.Threaded: implement fileStat for WindowsAndrew Kelley
2025-10-29std: fix build failure on wasm32-freestandingAndrew Kelley
2025-10-29std: fix compilation errors on WindowsAndrew Kelley
2025-10-29std.Io: add dirAccessAndrew Kelley
2025-10-29std.fs.File: begrudgingly add back deprecated APIsAndrew Kelley
I'm not ready to rework MachO linker file access at the moment.
2025-10-29std.Io: implement dirStatPathAndrew Kelley
2025-10-29std.Io: bring back Timestamp but also keep Clock.TimestampAndrew Kelley
this feels better
2025-10-29std.Io: implement fileStatAndrew Kelley
2025-10-29std: updating to std.Io interfaceAndrew Kelley
got the build runner compiling
2025-10-29WIP land the std.Io interfaceAndrew Kelley
fix std lib compilation errors caused by introducing std.Io
2025-10-29std.Io: extract Dir to separate fileAndrew Kelley
2025-10-29std: start moving fs.File to IoAndrew Kelley
2025-10-27remove all Oracle Solaris supportAlex Rønne Petersen
There is no straightforward way for the Zig team to access the Solaris system headers; to do this, one has to create an Oracle account, accept their EULA to download the installer ISO, and finally install it on a machine or VM. We do not have to jump through hoops like this for any other OS that we support, and no one on the team has expressed willingness to do it. As a result, we cannot audit any Solaris contributions to std.c or other similarly sensitive parts of the standard library. The best we would be able to do is assume that Solaris and illumos are 100% compatible with no way to verify that assumption. But at that point, the solaris and illumos OS tags would be functionally identical anyway. For Solaris especially, any contributions that involve APIs introduced after the OS was made closed-source would also be inherently more risky than equivalent contributions for other proprietary OSs due to the case of Google LLC v. Oracle America, Inc., wherein Oracle clearly demonstrated its willingness to pursue legal action against entities that merely copy API declarations. Finally, Oracle laid off most of the Solaris team in 2017; the OS has been in maintenance mode since, presumably to be retired completely sometime in the 2030s. For these reasons, this commit removes all Oracle Solaris support. Anyone who still wishes to use Zig on Solaris can try their luck by simply using illumos instead of solaris in target triples - chances are it'll work. But there will be no effort from the Zig team to support this use case; we recommend that people move to illumos instead.
2025-10-10replaced https://simonsapin.github.io/wtf-8/ with https://wtf-8.codeberg.page/usebeforefree
2025-10-09std.fs.File.Reader.seekTo: fix one more logical position bugAndrew Kelley
2025-10-08std: std.fs.File fix sendFile with buffered dataMaciej 'vesim' Kuliński
fixes #25196 Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2025-10-08std: fix sendFileReading not accounting for bufferAndrew Kelley
Related to 1d764c1fdf04829cec5974d82cec901825a80e49 Test case provided by: Co-authored-by: Kendall Condon <goon.pri.low@gmail.com>
2025-10-08std: fix File.Writer sendfile with buffered contentsAndrew Kelley
* File.Writer.seekBy passed wrong offset to setPosAdjustingBuffer. * File.Writer.sendFile incorrectly used non-logical position. Related to 1d764c1fdf04829cec5974d82cec901825a80e49 Test case provided by: Co-authored-by: Kendall Condon <goon.pri.low@gmail.com>
2025-09-24use copy_file_range syscall on linuxrpkak
2025-09-05Revert "Merge pull request #24905 from gooncreeper/file-reader-buffered"Andrew Kelley
This reverts commit ac42eaaadd0650ffc281f9a1ed1a642fde8984b7, reversing changes made to 9fa2394f8c00d060931d69fb6f342f7f2e3d826e. I would like a chance to review this, please. I already spotted some issues.
2025-09-05Merge pull request #24905 from gooncreeper/file-reader-bufferedIsaac Freund
Fix Io.Writer sendFile bugs with buffered reader contents
2025-09-04std.fs.File.Writer: break up seekToAndrew Kelley
- introduce seekToUnbuffered which asserts no buffered data and does not have WriteFailed in the error set - remove WriteFailed from SeekError - make seekTo based on calling flush and then seekToUnbuffered - revert the change to reset seek_err since the error sets are compatible again
2025-09-04fix sendFile implementations bypassing interface bufferKendall Condon
Also removes `File.Reader.read` since it is otherwise unused and is a footgun.
2025-09-04File.Writer.sendFile: properly update reader posKendall Condon
seekBy affects the reader's physical position, not its logical position.
2025-09-03fix: std.fs.File.Writer.seekTo does not flush (#25135)Josh GM Walker
* add failing test case * perform flush and allow error * dont over constrain flush error * reset seek error during conversion
2025-08-29std.Io: delete GenericReaderAndrew Kelley
and delete deprecated alias std.io
2025-08-28std.Io: delete GenericWriterAndrew Kelley
2025-08-20Use readStreaming, not readPositional, for streaming file readVec on WindowsCarl Åstholm
2025-08-19Fix bugs in Windows readVec implementationsCarl Åstholm
2025-08-16Compilation: remove last instance of deprecatedReaderAndrew Kelley
This also makes initStreaming preemptively disable file size checking.
2025-08-14std.fs.File.Reader: fix freestanding build failuresAndrew Kelley
This should be enough to unblock people for now. We'll revisit the way these things are organized with the upcoming std.Io interface. fixes #24685
2025-08-13std.fs.File.Writer.sendFile: handle sendfile errorsAndrew Kelley
fixes #24842
2025-08-13std.fs.File.Reader: fix seekByAndrew Kelley
Tested locally: stage3/bin/zig build test -Dskip-release -Dskip-non-native closes #24495 closes #24498 closes #24713
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-11std.fs.File: prefer getSize over getEndPosAndrew Kelley
The former detects when it is appropriate to switch to streaming mode. closes #24798
2025-08-10std.fs.File.Reader.getSize: check file kind on statAndrew Kelley
closes #24794
2025-08-10std.net.Stream.Reader: init size_errAndrew Kelley
This code knows in advance that stat() should never be called. closes #24754
2025-08-07Merge pull request #24698 from ziglang/httpAndrew Kelley
std: rework HTTP and TLS for new I/O API
2025-08-08Fix some libc version checks for BionicTibboddiT
2025-08-07std.fs.File.Reader: fix readVec fillAndrew Kelley
respect the case when there is existing buffer
2025-08-06std.Io.Reader: use readVec for fill functionsAndrew Kelley
readVec has two updated responsibilities: 1. it must respect any existing already buffered data. 2. it must write to the buffer if data is empty
2025-07-31std: match readVec fn prototype exactlyAndrew Kelley
this is not necessary according to zig language, but works around a flaw in the C backend
2025-07-31std.Io: delete SeekableStreamAndrew Kelley
Alternative is to use File.Reader and File.Writer directly.
2025-07-30std.Io.Reader: introduce readVec back into the VTableAndrew Kelley
simplifies and fixes things addresses a subset of #24608
2025-07-25std.posix.ftruncate: handle NonResizable properlyAndrew Kelley
2025-07-25std.fs.File.end: account for streaming modeAndrew Kelley
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-07-22std.fs.File.Reader.sendFile: fix 32-bit freebsdAndrew Kelley