os: document DirFS implements fs.StatFS #51856
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
What version of Go are you using (
go version
)?The change which added
.Stat
Does this issue reproduce with the latest release?
Yes - this issue exists in >=17 (change to implement
fs.StatFS
introduced here)What operating system and processor architecture are you using (
go env
)?n/a
What did you do?
https://go.dev/play/p/PdBdag3nnUd
Use
.Stat
on the result ofos.DirFS
.What did you expect to see?
The program should compile and stat the file.
os.DirFS
should returnfs.StatFS
instead of afs.FS
asos.dirFS
implementsfs.StatFS
.Same result as it would be if manually casting to
fs.StatFS
- https://go.dev/play/p/2T4F9981gzE?v=gotipWhat did you see instead?
There might be a reason for
os.DirFS
returnsfs.FS
instead offs.StatFS
but I didn't see any comments on the change introducing it that mentioned one.The text was updated successfully, but these errors were encountered: