mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
update all std.fs.cwd() to std.Io.Dir.cwd()
This commit is contained in:
+2
-2
@@ -208,7 +208,7 @@ pub fn setName(self: Thread, io: Io, name: []const u8) SetNameError!void {
|
||||
var buf: [32]u8 = undefined;
|
||||
const path = try std.fmt.bufPrint(&buf, "/proc/self/task/{d}/comm", .{self.getHandle()});
|
||||
|
||||
const file = try std.fs.cwd().openFile(io, path, .{ .mode = .write_only });
|
||||
const file = try Io.Dir.cwd().openFile(io, path, .{ .mode = .write_only });
|
||||
defer file.close(io);
|
||||
|
||||
try file.writeAll(name);
|
||||
@@ -325,7 +325,7 @@ pub fn getName(self: Thread, buffer_ptr: *[max_name_len:0]u8) GetNameError!?[]co
|
||||
var threaded: std.Io.Threaded = .init_single_threaded;
|
||||
const io = threaded.ioBasic();
|
||||
|
||||
const file = try std.fs.cwd().openFile(io, path, .{});
|
||||
const file = try Io.Dir.cwd().openFile(io, path, .{});
|
||||
defer file.close(io);
|
||||
|
||||
var file_reader = file.readerStreaming(io, &.{});
|
||||
|
||||
Reference in New Issue
Block a user