Mono Class Library: Mono.Unix.UnixStream Overview | Members

Mono.Unix.UnixStream.AdviseFileAccessPattern Method

Advises a file access pattern for a file stream.

public void AdviseFileAccessPattern (FileAccessPattern pattern)

See Also

Mono.Unix.Native.Syscall.posix_fadvise

Parameters

pattern
A Mono.Unix.FileAccessPattern containing the file access pattern to suggest.

Exceptions

TypeReason
ArgumentException

stream is not a valid file stream.

-or-

advice is not a value.

ArgumentNullExceptionstream is null.
ObjectDisposedException The stream has been closed.
System.IO.IOExceptionstream refers to a pipe or FIFO.

Remarks

AdviseFileAccessPattern is used to announce an intention to access file data with a specific pattern, allowing the kernel to perform appropriate optimizations.

pattern applies to a region starting at offset and extending for len bytes (or until end-of-file if len is 0) within the file specified by stream. The specified region need not currently exist.

The specified pattern is not binding; it merely constitutes an expectation on behalf of the application.

Requirements

Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0