System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile Method

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

Syntax

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

Parameters

path
The path to the file to map.
mode
Access mode; must be System.IO.FileMode.Open.
mapName
A name to assign to the memory-mapped file.

Returns

A memory-mapped file that has the specified name and 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