0
1
mirror of https://github.com/golang/go synced 2025-05-05 03:21:36 +00:00
Files
.github
api
doc
initial
next
6-stdlib
99-minor
archive
crypto
debug
go
io
mime
net
os
15388.md
49580.md
67002.md
regexp
sync
testing
unicode
0-heading.md
README
0-heading.md
1-intro.md
2-language.md
3-tools.md
4-runtime.md
5-toolchain.md
7-ports.md
README.md
asm.html
go_mem.html
go_spec.html
godebug.md
lib
misc
src
test
.gitattributes
.gitignore
CONTRIBUTING.md
LICENSE
PATENTS
README.md
SECURITY.md
codereview.cfg
go.env
Roxy Light f7b8dd9033 io/fs: add ReadLinkFS interface
Added implementations for *io/fs.subFS, os.DirFS, and testing/fstest.MapFS.
Amended testing/fstest.TestFS to check behavior.

Addressed TODOs in archive/tar and os.CopyFS around symbolic links.

I am deliberately not changing archive/zip in this CL,
since it currently does not resolve symlinks
as part of its filesystem implementation.
I am unsure of the compatibility restrictions on doing so,
so figured it would be better to address independently.

testing/fstest.MapFS now includes resolution of symlinks,
with MapFile.Data storing the symlink data.
The behavior change there seemed less intrusive,
especially given its intended usage in tests,
and it is especially helpful in testing the io/fs function implementations.

Fixes 

Change-Id: I58ec6915e8cc97341cdbfd9c24c67d1b60139447
Reviewed-on: https://go-review.googlesource.com/c/go/+/385534
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Funda Secgin <fundasecgin33@gmail.com>
2025-02-03 08:38:43 -08:00

3 lines
171 B
Markdown

The filesystem returned by [DirFS] implements the new [io/fs.ReadLinkFS] interface.
[CopyFS] supports symlinks when copying filesystems that implement [io/fs.ReadLinkFS].