zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 8c55c4550a7f79d732f0d2ffbf0455b058ab5aad (tree)
parent 9d41ff335ca8f5f635a3b192339f637192bd73c8
Author: LemonBoy <thatlemon@gmail.com>
Date:   Wed,  5 Feb 2020 20:39:14 +0100

std: Rename isAbsoluteW to isAbsoluteWindowsW

Diffstat:
Mlib/std/fs.zig | 10+++++-----
Mlib/std/fs/path.zig | 2+-
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/std/fs.zig b/lib/std/fs.zig @@ -810,7 +810,7 @@ pub const Dir = struct { }; var attr = w.OBJECT_ATTRIBUTES{ .Length = @sizeOf(w.OBJECT_ATTRIBUTES), - .RootDirectory = if (path.isAbsoluteW(sub_path_w)) null else self.fd, + .RootDirectory = if (path.isAbsoluteWindowsW(sub_path_w)) null else self.fd, .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here. .ObjectName = &nt_name, .SecurityDescriptor = null, @@ -960,7 +960,7 @@ pub const Dir = struct { }; var attr = w.OBJECT_ATTRIBUTES{ .Length = @sizeOf(w.OBJECT_ATTRIBUTES), - .RootDirectory = if (path.isAbsoluteW(sub_path_w)) null else self.fd, + .RootDirectory = if (path.isAbsoluteWindowsW(sub_path_w)) null else self.fd, .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here. .ObjectName = &nt_name, .SecurityDescriptor = null, @@ -1327,7 +1327,7 @@ pub fn openFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.OpenFlags) /// Same as `openFileAbsolute` but the path parameter is WTF-16 encoded. pub fn openFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.OpenFlags) File.OpenError!File { - assert(path.isAbsoluteW(absolute_path_w)); + assert(path.isAbsoluteWindowsW(absolute_path_w)); return cwd().openFileW(absolute_path_w, flags); } @@ -1350,7 +1350,7 @@ pub fn createFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.CreateFla /// Same as `createFileAbsolute` but the path parameter is WTF-16 encoded. pub fn createFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.CreateFlags) File.OpenError!File { - assert(path.isAbsoluteW(absolute_path_w)); + assert(path.isAbsoluteWindowsW(absolute_path_w)); return cwd().createFileW(absolute_path_w, flags); } @@ -1371,7 +1371,7 @@ pub fn deleteFileAbsoluteC(absolute_path_c: [*:0]const u8) DeleteFileError!void /// Same as `deleteFileAbsolute` except the parameter is WTF-16 encoded. pub fn deleteFileAbsoluteW(absolute_path_w: [*:0]const u16) DeleteFileError!void { - assert(path.isAbsoluteW(absolute_path_w)); + assert(path.isAbsoluteWindowsW(absolute_path_w)); return cwd().deleteFileW(absolute_path_w); } diff --git a/lib/std/fs/path.zig b/lib/std/fs/path.zig @@ -173,7 +173,7 @@ pub fn isAbsoluteWindows(path: []const u8) bool { return isAbsoluteWindowsImpl(u8, path); } -pub fn isAbsoluteW(path_w: [*:0]const u16) bool { +pub fn isAbsoluteWindowsW(path_w: [*:0]const u16) bool { return isAbsoluteWindowsImpl(u16, mem.toSliceConst(u16, path_w)); }