authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-02-05 20:39:14+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-02-05 20:39:14+01:00
log8c55c4550a7f79d732f0d2ffbf0455b058ab5aad
tree10e39598cdd9a42e34fa4091afa033c597c4d7d3
parent9d41ff335ca8f5f635a3b192339f637192bd73c8

std: Rename isAbsoluteW to isAbsoluteWindowsW


2 files changed, 6 insertions(+), 6 deletions(-)

lib/std/fs.zig+5-5
...@@ -810,7 +810,7 @@ pub const Dir = struct {...@@ -810,7 +810,7 @@ pub const Dir = struct {
810 };810 };
811 var attr = w.OBJECT_ATTRIBUTES{811 var attr = w.OBJECT_ATTRIBUTES{
812 .Length = @sizeOf(w.OBJECT_ATTRIBUTES),812 .Length = @sizeOf(w.OBJECT_ATTRIBUTES),
813 .RootDirectory = if (path.isAbsoluteW(sub_path_w)) null else self.fd,813 .RootDirectory = if (path.isAbsoluteWindowsW(sub_path_w)) null else self.fd,
814 .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here.814 .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here.
815 .ObjectName = &nt_name,815 .ObjectName = &nt_name,
816 .SecurityDescriptor = null,816 .SecurityDescriptor = null,
...@@ -960,7 +960,7 @@ pub const Dir = struct {...@@ -960,7 +960,7 @@ pub const Dir = struct {
960 };960 };
961 var attr = w.OBJECT_ATTRIBUTES{961 var attr = w.OBJECT_ATTRIBUTES{
962 .Length = @sizeOf(w.OBJECT_ATTRIBUTES),962 .Length = @sizeOf(w.OBJECT_ATTRIBUTES),
963 .RootDirectory = if (path.isAbsoluteW(sub_path_w)) null else self.fd,963 .RootDirectory = if (path.isAbsoluteWindowsW(sub_path_w)) null else self.fd,
964 .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here.964 .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here.
965 .ObjectName = &nt_name,965 .ObjectName = &nt_name,
966 .SecurityDescriptor = null,966 .SecurityDescriptor = null,
...@@ -1327,7 +1327,7 @@ pub fn openFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.OpenFlags)...@@ -1327,7 +1327,7 @@ pub fn openFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.OpenFlags)
13271327
1328/// Same as `openFileAbsolute` but the path parameter is WTF-16 encoded.1328/// Same as `openFileAbsolute` but the path parameter is WTF-16 encoded.
1329pub fn openFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.OpenFlags) File.OpenError!File {1329pub fn openFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.OpenFlags) File.OpenError!File {
1330 assert(path.isAbsoluteW(absolute_path_w));1330 assert(path.isAbsoluteWindowsW(absolute_path_w));
1331 return cwd().openFileW(absolute_path_w, flags);1331 return cwd().openFileW(absolute_path_w, flags);
1332}1332}
13331333
...@@ -1350,7 +1350,7 @@ pub fn createFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.CreateFla...@@ -1350,7 +1350,7 @@ pub fn createFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.CreateFla
13501350
1351/// Same as `createFileAbsolute` but the path parameter is WTF-16 encoded.1351/// Same as `createFileAbsolute` but the path parameter is WTF-16 encoded.
1352pub fn createFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.CreateFlags) File.OpenError!File {1352pub fn createFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.CreateFlags) File.OpenError!File {
1353 assert(path.isAbsoluteW(absolute_path_w));1353 assert(path.isAbsoluteWindowsW(absolute_path_w));
1354 return cwd().createFileW(absolute_path_w, flags);1354 return cwd().createFileW(absolute_path_w, flags);
1355}1355}
13561356
...@@ -1371,7 +1371,7 @@ pub fn deleteFileAbsoluteC(absolute_path_c: [*:0]const u8) DeleteFileError!void...@@ -1371,7 +1371,7 @@ pub fn deleteFileAbsoluteC(absolute_path_c: [*:0]const u8) DeleteFileError!void
13711371
1372/// Same as `deleteFileAbsolute` except the parameter is WTF-16 encoded.1372/// Same as `deleteFileAbsolute` except the parameter is WTF-16 encoded.
1373pub fn deleteFileAbsoluteW(absolute_path_w: [*:0]const u16) DeleteFileError!void {1373pub fn deleteFileAbsoluteW(absolute_path_w: [*:0]const u16) DeleteFileError!void {
1374 assert(path.isAbsoluteW(absolute_path_w));1374 assert(path.isAbsoluteWindowsW(absolute_path_w));
1375 return cwd().deleteFileW(absolute_path_w);1375 return cwd().deleteFileW(absolute_path_w);
1376}1376}
13771377
lib/std/fs/path.zig+1-1
...@@ -173,7 +173,7 @@ pub fn isAbsoluteWindows(path: []const u8) bool {...@@ -173,7 +173,7 @@ pub fn isAbsoluteWindows(path: []const u8) bool {
173 return isAbsoluteWindowsImpl(u8, path);173 return isAbsoluteWindowsImpl(u8, path);
174}174}
175175
176pub fn isAbsoluteW(path_w: [*:0]const u16) bool {176pub fn isAbsoluteWindowsW(path_w: [*:0]const u16) bool {
177 return isAbsoluteWindowsImpl(u16, mem.toSliceConst(u16, path_w));177 return isAbsoluteWindowsImpl(u16, mem.toSliceConst(u16, path_w));
178}178}
179179