diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-19 16:21:54 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:11 -0800 |
| commit | 6e0c7ed8659d9d60a59a9dcddd3aed9cd18b659b (patch) | |
| tree | 637d71ea08261d2483f33de3847d43af01bafbcc /lib/std/Io/Dir.zig | |
| parent | 52ba2a4c72cee39292d09506655197811feceede (diff) | |
| download | zig-6e0c7ed8659d9d60a59a9dcddd3aed9cd18b659b.tar.gz zig-6e0c7ed8659d9d60a59a9dcddd3aed9cd18b659b.zip | |
std: rename makeDir to createDir for consistency with createFile
Diffstat (limited to 'lib/std/Io/Dir.zig')
| -rw-r--r-- | lib/std/Io/Dir.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/std/Io/Dir.zig b/lib/std/Io/Dir.zig index 238f25eb6b..78637015ba 100644 --- a/lib/std/Io/Dir.zig +++ b/lib/std/Io/Dir.zig @@ -664,25 +664,25 @@ pub const MakeError = error{ /// /// Related: /// * `makePath` -/// * `makeDirAbsolute` -pub fn makeDir(dir: Dir, io: Io, sub_path: []const u8, permissions: Permissions) MakeError!void { +/// * `createDirAbsolute` +pub fn createDir(dir: Dir, io: Io, sub_path: []const u8, permissions: Permissions) MakeError!void { return io.vtable.dirMake(io.userdata, dir, sub_path, permissions); } /// Create a new directory, based on an absolute path. /// -/// Asserts that the path is absolute. See `makeDir` for a function that +/// Asserts that the path is absolute. See `createDir` for a function that /// operates on both absolute and relative paths. /// /// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/). /// On WASI, `absolute_path` should be encoded as valid UTF-8. /// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding. -pub fn makeDirAbsolute(io: Io, absolute_path: []const u8, permissions: Permissions) MakeError!void { +pub fn createDirAbsolute(io: Io, absolute_path: []const u8, permissions: Permissions) MakeError!void { assert(path.isAbsolute(absolute_path)); - return makeDir(.cwd(), io, absolute_path, permissions); + return createDir(.cwd(), io, absolute_path, permissions); } -test makeDirAbsolute {} +test createDirAbsolute {} pub const MakePathError = MakeError || StatFileError; |
