From: hopehook Date: Tue, 22 Mar 2022 15:33:48 +0000 (+0800) Subject: os: document DirFS implements fs.StatFS X-Git-Tag: go1.19beta1~916 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b0750de656602bb1d994dd4a524f522567184db2;p=gostls13.git os: document DirFS implements fs.StatFS Fixes #51856 Change-Id: I8328d73bbb7bc166d58281180b64785a634e9bab Reviewed-on: https://go-review.googlesource.com/c/go/+/394555 Reviewed-by: Ian Lance Taylor Trust: Daniel Martí Run-TryBot: Daniel Martí TryBot-Result: Gopher Robot --- diff --git a/src/os/file.go b/src/os/file.go index 2823128554..ea64a662cc 100644 --- a/src/os/file.go +++ b/src/os/file.go @@ -623,6 +623,8 @@ func isWindowsNulName(name string) bool { // the /prefix tree, then using DirFS does not stop the access any more than using // os.Open does. DirFS is therefore not a general substitute for a chroot-style security // mechanism when the directory tree contains arbitrary content. +// +// The result implements fs.StatFS. func DirFS(dir string) fs.FS { return dirFS(dir) }