]> Cypherpunks repositories - gostls13.git/commitdiff
os: document DirFS implements fs.StatFS
authorhopehook <hopehook.com@gmail.com>
Tue, 22 Mar 2022 15:33:48 +0000 (23:33 +0800)
committerIan Lance Taylor <iant@golang.org>
Sat, 26 Mar 2022 23:18:20 +0000 (23:18 +0000)
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>

src/os/file.go

index 28231285542a19b8ffd6d545ffb5d460cc3c8fe1..ea64a662cc2b344d2b86d6dd5432af70438ab5b0 100644 (file)
@@ -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)
 }