Skip to content

Commit f594183

Browse files
committed
Add missing override for Write(ReadOnlySpan<byte> buffer)
1 parent 3fd3f2a commit f594183

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

System.IO.FileSystem/FileStream.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,16 @@ public override void Write(byte[] buffer, int offset, int count)
545545
}
546546
}
547547

548+
/// <summary>
549+
/// Writes a sequence of bytes from a read-only span to the current file stream and advances the current position within this file stream by the number of bytes written.
550+
/// </summary>
551+
/// <param name="buffer">A region of memory. This method copies the contents of this region to the current file stream.</param>
552+
/// <exception cref="IOException">The underlying pipe is closed or disconnected.</exception>
553+
public override void Write(ReadOnlySpan<byte> buffer)
554+
{
555+
Write(buffer.ToArray(), 0, buffer.Length);
556+
}
557+
548558
/// <summary>
549559
/// Writes a byte to the current position in the file stream.
550560
/// </summary>

0 commit comments

Comments
 (0)