aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fs
AgeCommit message (Collapse)Author
2025-11-20system specific errnorpkak
2025-11-20update deprecated ArrayListUnmanaged usage (#25958)Benjamin Jurk
2025-11-20Merge pull request #25898 from jacobly0/elfv2-progressAndrew Kelley
Elf2: more progress
2025-11-15Merge pull request #25539 from squeek502/windows-readlinkwRyan Liptak
windows: Make readLinkW APIs output WTF-16, reduce stack usage of callers
2025-11-15windows: Make readLinkW APIs output WTF-16, reduce stack usage of callersRyan Liptak
- Affects the following functions: + `std.fs.Dir.readLinkW` + `std.os.windows.ReadLink` + `std.os.windows.ntToWin32Namespace` + `std.posix.readlinkW` + `std.posix.readlinkatW` Each of these functions (except `ntToWin32Namespace`) took WTF-16 as input and would output WTF-8, which makes optimal buffer re-use difficult at callsites and could force unnecessary WTF-16 <-> WTF-8 conversion during an intermediate step. The functions have been updated to output WTF-16, and also allow for the path and the output to re-use the same buffer (i.e. in-place modification), which can reduce the stack usage at callsites. For example, all of `std.fs.Dir.readLink`/`readLinkZ`/`std.posix.readlink`/`readlinkZ`/`readlinkat`/`readlinkatZ` have had their stack usage reduced by one PathSpace struct (64 KiB) when targeting Windows. The new `ntToWin32Namespace` takes an output buffer and returns a slice from that instead of returning a PathSpace, which is necessary to make the above possible.
2025-11-15fix: add specific error set for SelectiveWalker iterator functionSam Bossley
2025-11-14represent Mac Catalyst as aarch64-maccatalyst-none rather than ↵Alex Rønne Petersen
aarch64-ios-macabi Apple's own headers and tbd files prefer to think of Mac Catalyst as a distinct OS target. Earlier, when DriverKit support was added to LLVM, it was represented a distinct OS. So why Apple decided to only represent Mac Catalyst as an ABI in the target triple is beyond me. But this isn't the first time they've ignored established target triple norms (see: armv7k and aarch64_32) and it probably won't be the last. While doing this, I also audited all Darwin OS prongs throughout the codebase and made sure they cover all the tags.
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.Io.Threaded: implement dirOpenDirAndrew Kelley
2025-10-29std.Io: add dirMakePath and dirMakeOpenPathAndrew Kelley
2025-10-29std.Io.Threaded: implement dirOpenFile for WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement dirCreateFile for WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement dirAccess for WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement dirStatPath for WindowsAndrew Kelley
2025-10-29std: fix compilation errors on WindowsAndrew Kelley
2025-10-29std: move some windows path checking logicAndrew Kelley
2025-10-29std.fs: use BadPathName rather than InvalidWtf8 on WindowsAndrew Kelley
2025-10-29std.Io: add dirOpenDir and WASI implAndrew Kelley
2025-10-29std.Io.Threaded: implement dirOpenFile for WASIAndrew Kelley
2025-10-29std.Io.Threaded: implement dirCreateFile for WASIAndrew Kelley
2025-10-29std.Io: add dirAccessAndrew Kelley
2025-10-29fix miscellaneous compilation errorsAndrew Kelley
- ILSEQ -> error.BadPathName - implement dirStatPath for WASI
2025-10-29std: fix compilation errors on macosAndrew Kelley
2025-10-29fix miscellaneous compilation failuresAndrew 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-29fix compilation errors introduced by rebasingAndrew Kelley
2025-10-29std.Io: implement dirOpenFileAndrew Kelley
2025-10-29std.Io: implement dirStatPathAndrew Kelley
2025-10-29std: fix some Io compilation errorsAndrew 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: hack away at std.Io return flightAndrew Kelley
2025-10-29WIP: hack at std.Io on a planeAndrew Kelley
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-26fix `std.fs.path.resolveWindows` on UNC paths with mixed path separatorsTechatrix
2025-10-10replaced https://simonsapin.github.io/wtf-8/ with https://wtf-8.codeberg.page/usebeforefree
2025-10-10Dir.realpathW: remove redundant buffer/copyRyan Liptak
This same change was applied in 69007f096177143086e28da0dc1a0eff4efcc52c but accidentally reverted in 7bf740ee718f4b6109cd9fe7014d1784d48ada48
2025-10-09std.fs.File.Reader.seekTo: fix one more logical position bugAndrew Kelley
2025-10-09Merge pull request #25512 from ziglang/sendfile-fixesAndrew Kelley
std.Io: Writer and Reader bug fixes related to sendFile, delimiters, Limited, and seeking
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-08Deprecate old realpathW correctlyMichael Pfaff
- Rename modified `realpathW` to `realpathW2` - Re-add original `realpathW` - Add deprecation notice to `realpathW`
2025-10-08Reuse pathname_w buffer as out_buffer when calling realpathWMichael Pfaff
2025-10-08Improve documentation on Dir.realpathWMichael Pfaff