std.process: currentDir -> currentPath

In Zig standard library, Dir means an open directory handle. path
represents a file system identifier string. This function is better
named after "current path" than "current dir". "get" and "working" are
superfluous.
This commit is contained in:
Andrew Kelley
2026-01-29 18:47:58 -08:00
parent 0a37ad2ec4
commit b1d1806fef
18 changed files with 41 additions and 41 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ pub fn main(init: std.process.Init) !void {
const arena = init.arena.allocator();
const io = init.io;
const environ_map = init.environ_map;
const cwd_path = try std.process.currentDirAlloc(io, arena);
const cwd_path = try std.process.currentPathAlloc(io, arena);
try environ_map.put("CLICOLOR_FORCE", "1");
+1 -1
View File
@@ -32,7 +32,7 @@ pub fn main(init: std.process.Init) !void {
const arena = init.arena.allocator();
const io = init.io;
const environ_map = init.environ_map;
const cwd_path = try std.process.currentDirAlloc(io, arena);
const cwd_path = try std.process.currentPathAlloc(io, arena);
var opt_zig_exe: ?[]const u8 = null;
var opt_input_file_name: ?[]const u8 = null;
+1 -1
View File
@@ -145,7 +145,7 @@ pub fn main(init: std.process.Init) !void {
const arena = init.arena.allocator();
const io = init.io;
const args = try init.minimal.args.toSlice(arena);
const cwd_path = try std.process.currentDirAlloc(io, arena);
const cwd_path = try std.process.currentPathAlloc(io, arena);
const environ_map = init.environ_map;
var search_paths = std.array_list.Managed([]const u8).init(arena);
+1 -1
View File
@@ -146,7 +146,7 @@ pub fn main(init: std.process.Init) !void {
const io = init.io;
const args = try init.minimal.args.toSlice(arena);
const environ_map = init.environ_map;
const cwd = try std.process.currentDirAlloc(io, arena);
const cwd = try std.process.currentPathAlloc(io, arena);
var search_paths = std.array_list.Managed([]const u8).init(arena);
var opt_out_dir: ?[]const u8 = null;