RandomAccess.Write Metod

Definition

Överlagringar

Name Description
Write(SafeFileHandle, IReadOnlyList<ReadOnlyMemory<Byte>>, Int64)

Skriver en sekvens med byte från angivna buffertar till angiven fil vid given förskjutning.

Write(SafeFileHandle, ReadOnlySpan<Byte>, Int64)

Skriver en sekvens med byte från given buffert till given fil vid given förskjutning.

Write(SafeFileHandle, IReadOnlyList<ReadOnlyMemory<Byte>>, Int64)

Källa:
RandomAccess.cs
Källa:
RandomAccess.cs
Källa:
RandomAccess.cs
Källa:
RandomAccess.cs
Källa:
RandomAccess.cs

Skriver en sekvens med byte från angivna buffertar till angiven fil vid given förskjutning.

public:
 static void Write(Microsoft::Win32::SafeHandles::SafeFileHandle ^ handle, System::Collections::Generic::IReadOnlyList<ReadOnlyMemory<System::Byte>> ^ buffers, long fileOffset);
public static void Write(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.Collections.Generic.IReadOnlyList<ReadOnlyMemory<byte>> buffers, long fileOffset);
static member Write : Microsoft.Win32.SafeHandles.SafeFileHandle * System.Collections.Generic.IReadOnlyList<ReadOnlyMemory<byte>> * int64 -> unit
Public Shared Sub Write (handle As SafeFileHandle, buffers As IReadOnlyList(Of ReadOnlyMemory(Of Byte)), fileOffset As Long)

Parametrar

handle
SafeFileHandle

Filhandtaget.

buffers
IReadOnlyList<ReadOnlyMemory<Byte>>

En lista över minnesbuffertar. Den här metoden kopierar innehållet i dessa buffertar till filen.

fileOffset
Int64

Filpositionen att skriva till.

Undantag

handle eller buffers är null.

handle är ogiltigt.

Filen är stängd.

Filen stöder inte sökning (pipe eller socket).

fileOffset är negativ.

handle inte öppnats för skrivning.

Ett I/O-fel uppstod.

Kommentarer

Filens position är inte avancerad.

Gäller för

Write(SafeFileHandle, ReadOnlySpan<Byte>, Int64)

Källa:
RandomAccess.cs
Källa:
RandomAccess.cs
Källa:
RandomAccess.cs
Källa:
RandomAccess.cs
Källa:
RandomAccess.cs

Skriver en sekvens med byte från given buffert till given fil vid given förskjutning.

public:
 static void Write(Microsoft::Win32::SafeHandles::SafeFileHandle ^ handle, ReadOnlySpan<System::Byte> buffer, long fileOffset);
public static void Write(Microsoft.Win32.SafeHandles.SafeFileHandle handle, ReadOnlySpan<byte> buffer, long fileOffset);
static member Write : Microsoft.Win32.SafeHandles.SafeFileHandle * ReadOnlySpan<byte> * int64 -> unit
Public Shared Sub Write (handle As SafeFileHandle, buffer As ReadOnlySpan(Of Byte), fileOffset As Long)

Parametrar

handle
SafeFileHandle

Filhandtaget.

buffer
ReadOnlySpan<Byte>

En region med minne. Den här metoden kopierar innehållet i den här regionen till filen.

fileOffset
Int64

Filpositionen att skriva till.

Undantag

handle är null.

handle är ogiltigt.

Filen är stängd.

Filen stöder inte sökning (pipe eller socket).

fileOffset är negativ.

handle inte öppnats för skrivning.

Ett I/O-fel uppstod.

Kommentarer

Filens position är inte avancerad.

Gäller för