]> Cypherpunks repositories - gostls13.git/commit
os: add DirFS
authorRuss Cox <rsc@golang.org>
Mon, 6 Jul 2020 15:27:38 +0000 (11:27 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 20 Oct 2020 17:52:48 +0000 (17:52 +0000)
commitb1f76f7a220a806d74bf55da374ea89467753e1f
treee207656767e10cacca21283cb45991306474d40d
parent90c924ff88a8b5ab65538ccc16d160922b1b4003
os: add DirFS

It will inevitably be important to be able to pass an operating system
directory to code written to expect an fs.FS.

os.DirFS provides the conversion.

For #41190.

Change-Id: Id1a8fcbe4c7a30de2c47dea0504e9481a88b1b39
Reviewed-on: https://go-review.googlesource.com/c/go/+/243911
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/os/file.go
src/os/os_test.go