System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile Method

Creates a memory-mapped file that has the specified access mode from a file on disk.

Syntax

public static MemoryMappedFile CreateFromFile (string path, System.IO.FileMode mode)

Parameters

path
The path to file to map.
mode
Access mode; must be System.IO.FileMode.Open.

Returns

A memory-mapped file that has the specified access mode.

Remarks

The mode parameter pertains to the source file on disk. You can use only the System.IO.FileMode.Open enumeration value to create the memory-mapped file from the source file on disk.

Requirements

Namespace: System.IO.MemoryMappedFiles
Assembly: System.Core (in System.Core.dll)
Assembly Versions: 4.0.0.0