File tree 1 file changed +14
-0
lines changed 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -782,6 +782,20 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
782
782
1.14 with the addition of asynchronous preemption. Now this is
783
783
handled transparently.
784
784
</ p >
785
+
786
+ < p > <!-- CL 229101 -->
787
+ The < a href ="/pkg/os/#File "> < code > os.File</ code > </ a > type now
788
+ supports a < a href ="/pkg/os/#File.ReadFrom "> < code > ReadFrom</ code > </ a >
789
+ method. This permits the use of the < code > copy_file_range</ code >
790
+ system call on some systems when using
791
+ < a href ="/pkg/io/#Copy "> < code > io.Copy</ code > </ a > to copy data
792
+ from one < code > os.File</ code > to another. A consequence is that
793
+ < a href ="/pkg/io/#CopyBuffer "> < code > io.CopyBuffer</ code > </ a >
794
+ will not always use the provided buffer when copying to a
795
+ < code > os.File</ code > . If a program wants to force the use of
796
+ the provided buffer, it can be done by writing
797
+ < code > io.CopyBuffer(struct{ io.Writer }{dst}, src, buf)</ code > .
798
+ </ p >
785
799
</ dd >
786
800
</ dl >
787
801
You can’t perform that action at this time.
0 commit comments