From 4fa027a3cceb9068db8ff432abc8ab0d464f8b33 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Wed, 21 Dec 2022 15:39:21 +0800 Subject: docs: Clarify that std.fs.path.resolve doesn't resolve relative path to absolute path --- lib/std/fs/path.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/std/fs/path.zig b/lib/std/fs/path.zig index 91244e34bd..3d6ed27538 100644 --- 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 -- cgit v1.2.3