From b0750de656602bb1d994dd4a524f522567184db2 Mon Sep 17 00:00:00 2001 From: hopehook Date: Tue, 22 Mar 2022 23:33:48 +0800 Subject: [PATCH] os: document DirFS implements fs.StatFS MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/os/file.go | 2 ++ 1 file changed, 2 insertions(+) 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) } -- 2.50.0