RandomAccess 클래스

정의

스레드로부터 안전한 방식으로 파일을 읽고 쓰기 위한 오프셋 기반 API를 제공합니다.

public ref class RandomAccess abstract sealed
public static class RandomAccess
type RandomAccess = class
Public Class RandomAccess
상속
RandomAccess

설명

일반 디스크 파일만 지원됩니다. 파이프와 같은 보이지 않는 파일은 지원되지 않습니다.

메서드

FlushToDisk(SafeFileHandle)

지정된 파일의 운영 체제 버퍼를 디스크에 플러시합니다.

GetLength(SafeFileHandle)

파일의 길이(바이트)를 가져옵니다.

Read(SafeFileHandle, IReadOnlyList<Memory<Byte>>, Int64)

지정된 오프셋에서 지정된 파일에서 바이트 시퀀스를 읽습니다.

Read(SafeFileHandle, Span<Byte>, Int64)

지정된 오프셋에서 지정된 파일에서 바이트 시퀀스를 읽습니다.

ReadAsync(SafeFileHandle, IReadOnlyList<Memory<Byte>>, Int64, CancellationToken)

지정된 오프셋에서 지정된 파일에서 바이트 시퀀스를 읽습니다.

ReadAsync(SafeFileHandle, Memory<Byte>, Int64, CancellationToken)

지정된 오프셋에서 지정된 파일에서 바이트 시퀀스를 읽습니다.

SetLength(SafeFileHandle, Int64)

파일의 길이를 지정된 값으로 설정합니다.

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

지정된 오프셋에서 지정된 파일에 지정된 버퍼의 바이트 시퀀스를 씁니다.

Write(SafeFileHandle, ReadOnlySpan<Byte>, Int64)

지정된 오프셋에서 지정된 파일에 지정된 버퍼의 바이트 시퀀스를 씁니다.

WriteAsync(SafeFileHandle, IReadOnlyList<ReadOnlyMemory<Byte>>, Int64, CancellationToken)

지정된 오프셋에서 지정된 파일에 지정된 버퍼의 바이트 시퀀스를 씁니다.

WriteAsync(SafeFileHandle, ReadOnlyMemory<Byte>, Int64, CancellationToken)

지정된 오프셋에서 지정된 파일에 지정된 버퍼의 바이트 시퀀스를 씁니다.

적용 대상

추가 정보