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

Mono.Unix.FileHandleOperations.AdviseFileAccessPattern Method

Advises a file access pattern for a Unix file descriptor.

public static void AdviseFileAccessPattern (int fd, FileAccessPattern pattern)

See Also

Mono.Unix.Native.Syscall.posix_fadvise

Parameters

fd
A int containing the file descriptor to advise.
pattern
A Mono.Unix.FileAccessPattern containing the file access pattern to suggest.

Exceptions

TypeReason
ArgumentException

fd is not a valid file descriptor.

-or-

advice is not a valid value.

System.IO.IOExceptionfd 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 from beginning of file to end of file.

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