zig

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

commit 4fa027a3cceb9068db8ff432abc8ab0d464f8b33 (tree)
parent 1de96a2cc4bf2d1be1404690d6a867eb0127d533
Author: Sizhe Zhao <prc.zhao@outlook.com>
Date:   Wed, 21 Dec 2022 15:39:21 +0800

docs: Clarify that std.fs.path.resolve doesn't resolve relative path to
absolute path

Diffstat:
Mlib/std/fs/path.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/std/fs/path.zig b/lib/std/fs/path.zig @@ -460,7 +460,7 @@ pub fn resolve(allocator: Allocator, paths: []const []const u8) ![]u8 { } /// This function is like a series of `cd` statements executed one after another. -/// It resolves "." and "..". +/// It resolves "." and "..", but will not convert relative path to absolute path, use std.fs.Dir.realpath instead. /// The result does not have a trailing path separator. /// Each drive has its own current working directory. /// Path separators are canonicalized to '\\' and drives are canonicalized to capital letters. @@ -637,7 +637,7 @@ pub fn resolveWindows(allocator: Allocator, paths: []const []const u8) ![]u8 { } /// This function is like a series of `cd` statements executed one after another. -/// It resolves "." and "..". +/// It resolves "." and "..", but will not convert relative path to absolute path, use std.fs.Dir.realpath instead. /// The result does not have a trailing path separator. /// This function does not perform any syscalls. Executing this series of path /// lookups on the actual filesystem may produce different results due to