RandomAccess Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides offset-based APIs for reading and writing files in a thread-safe manner.
public ref class RandomAccess abstract sealed
public static class RandomAccess
type RandomAccess = class
Public Class RandomAccess
- Inheritance
-
RandomAccess
Remarks
Only regular disk files are supported. Unseekable files, like pipes, are not supported.
Methods
FlushToDisk(SafeFileHandle) |
Flushes the operating system buffers for the given file to disk. |
GetLength(SafeFileHandle) |
Gets the length of the file in bytes. |
Read(SafeFileHandle, IReadOnlyList<Memory<Byte>>, Int64) |
Reads a sequence of bytes from given file at given offset. |
Read(SafeFileHandle, Span<Byte>, Int64) |
Reads a sequence of bytes from given file at given offset. |
ReadAsync(SafeFileHandle, IReadOnlyList<Memory<Byte>>, Int64, CancellationToken) |
Reads a sequence of bytes from given file at given offset. |
ReadAsync(SafeFileHandle, Memory<Byte>, Int64, CancellationToken) |
Reads a sequence of bytes from given file at given offset. |
SetLength(SafeFileHandle, Int64) |
Sets the length of the file to the given value. |
Write(SafeFileHandle, IReadOnlyList<ReadOnlyMemory<Byte>>, Int64) |
Writes a sequence of bytes from given buffers to given file at given offset. |
Write(SafeFileHandle, ReadOnlySpan<Byte>, Int64) |
Writes a sequence of bytes from given buffer to given file at given offset. |
WriteAsync(SafeFileHandle, IReadOnlyList<ReadOnlyMemory<Byte>>, Int64, CancellationToken) |
Writes a sequence of bytes from given buffers to given file at given offset. |
WriteAsync(SafeFileHandle, ReadOnlyMemory<Byte>, Int64, CancellationToken) |
Writes a sequence of bytes from given buffer to given file at given offset. |
Applies to
See also
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za