doc/go1.20: document changes to os on Windows

This CL documents the changes introduced by
https://go-review.googlesource.com/c/go/+/405275.

Change-Id: I541712d65f2823ecdf606c5b91035cde55ecdac6
Reviewed-on: https://go-review.googlesource.com/c/go/+/452735
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
This commit is contained in:
qmuntal 2022-11-22 09:43:04 +01:00 committed by Russ Cox
parent 7db54f1050
commit ff18af8401

View file

@ -770,6 +770,19 @@ proxyHandler := &httputil.ReverseProxy{
<p><!-- CL 448897 -->
TODO: <a href="https://go.dev/cl/448897">https://go.dev/cl/448897</a>: os: remove special casing of NUL in Windows file operations
</p>
<p><!-- https://go.dev/issue/52747, CL 405275 -->
On Windows, <a href="/pkg/os/#File.Stat"><code>File.Stat</code></a>
now uses the file handle to retrieve attributes when the file is a directory.
Previously it would use the path passed to
<a href="/pkg/os/#Open"><code>Open</code></a>, which may no longer be the file
represented by the file handle if the file has been moved or replaced.
This change modifies <code>Open</code> to open directories without the
<code>FILE_SHARE_DELETE</code> access, which match the behavior of regular files.
</p>
<p><!-- https://go.dev/issue/36019, CL 405275 -->
On Windows, <a href="/pkg/os/#File.Seek"><code>File.Seek</code></a> now supports
seeking to the beginning of a directory.
</p>
</dd>
</dl><!-- os -->