aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhopehook <hopehook.com@gmail.com>2022-03-22 23:33:48 +0800
committerIan Lance Taylor <iant@golang.org>2022-03-26 23:18:20 +0000
commitb0750de656602bb1d994dd4a524f522567184db2 (patch)
treef560a2a5bcc99c4206cc4f229d86c53366c8a039 /src
parent3f69cc7d77fbc569824307e6dca37950003ce5a8 (diff)
downloadgo-b0750de656602bb1d994dd4a524f522567184db2.tar.xz
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 <iant@golang.org> Trust: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/os/file.go2
1 files changed, 2 insertions, 0 deletions
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)
}