Fixes #51856
Change-Id: I8328d73bbb7bc166d58281180b64785a634e9bab
Reviewed-on: https://go-review.googlesource.com/c/go/+/394555
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Daniel Martà <mvdan@mvdan.cc>
Run-TryBot: Daniel Martà <mvdan@mvdan.cc>
TryBot-Result: Gopher Robot <gobot@golang.org>
// 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)
}