io/fs: clarify that "." may only be used for root

For #70155

Change-Id: I648791c484e19bb12c6e4f84e2dc42eaaa4db546
Reviewed-on: https://go-review.googlesource.com/c/go/+/624595
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Ian Lance Taylor 2024-11-01 21:50:12 -07:00 committed by Gopher Robot
parent dacf253afa
commit d92e8fe25c
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ type FS interface {
// Path names passed to open are UTF-8-encoded,
// unrooted, slash-separated sequences of path elements, like “x/y/z”.
// Path names must not contain an element that is “.” or “..” or the empty string,
// except for the special case that the root directory is named “.”.
// except for the special case that the name "." may be used for the root directory.
// Paths must not start or end with a slash: “/x” and “x/” are invalid.
//
// Note that paths are slash-separated on all systems, even Windows.