aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Cache/Directory.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-03 20:37:43 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:07 -0800
commitd1d2c37af26902f953b2b72335b326c4b01e3bb2 (patch)
treeff74335c6b9eda252c6c4970d49f36bd6f904537 /lib/std/Build/Cache/Directory.zig
parent81214278ca14b832e53876feb70fa3c072c14dd6 (diff)
downloadzig-d1d2c37af26902f953b2b72335b326c4b01e3bb2.tar.gz
zig-d1d2c37af26902f953b2b72335b326c4b01e3bb2.zip
std: all Dir functions moved to std.Io
Diffstat (limited to 'lib/std/Build/Cache/Directory.zig')
-rw-r--r--lib/std/Build/Cache/Directory.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/std/Build/Cache/Directory.zig b/lib/std/Build/Cache/Directory.zig
index a105a91ed6..305ef25361 100644
--- a/lib/std/Build/Cache/Directory.zig
+++ b/lib/std/Build/Cache/Directory.zig
@@ -1,7 +1,9 @@
const Directory = @This();
+
const std = @import("../../std.zig");
-const assert = std.debug.assert;
+const Io = std.Io;
const fs = std.fs;
+const assert = std.debug.assert;
const fmt = std.fmt;
const Allocator = std.mem.Allocator;
@@ -9,7 +11,7 @@ const Allocator = std.mem.Allocator;
/// directly, but it is needed when passing the directory to a child process.
/// `null` means cwd.
path: ?[]const u8,
-handle: fs.Dir,
+handle: Io.Dir,
pub fn clone(d: Directory, arena: Allocator) Allocator.Error!Directory {
return .{
@@ -21,7 +23,7 @@ pub fn clone(d: Directory, arena: Allocator) Allocator.Error!Directory {
pub fn cwd() Directory {
return .{
.path = null,
- .handle = fs.cwd(),
+ .handle = .cwd(),
};
}
@@ -64,5 +66,5 @@ pub fn format(self: Directory, writer: *std.Io.Writer) std.Io.Writer.Error!void
}
pub fn eql(self: Directory, other: Directory) bool {
- return self.handle.fd == other.handle.fd;
+ return self.handle.handle == other.handle.handle;
}