Skip to content

Commit b0750de

Browse files
hopehookianlancetaylor
authored andcommitted
os: document DirFS implements fs.StatFS
Fixes golang#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>
1 parent 3f69cc7 commit b0750de

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/os/file.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,8 @@ func isWindowsNulName(name string) bool {
623623
// the /prefix tree, then using DirFS does not stop the access any more than using
624624
// os.Open does. DirFS is therefore not a general substitute for a chroot-style security
625625
// mechanism when the directory tree contains arbitrary content.
626+
//
627+
// The result implements fs.StatFS.
626628
func DirFS(dir string) fs.FS {
627629
return dirFS(dir)
628630
}

0 commit comments

Comments
 (0)