MemoryMappedFile::CreateFromFile Method (String^)
Creates a memory-mapped file from a file on disk.
Assembly: System.Core (in System.Core.dll)
Parameters
- path
-
Type:
System::String^
The path to file to map.
| Exception | Condition |
|---|---|
| ArgumentException | path is an empty string, contains only white space, or has one or more invalid characters, as defined by the Path::GetInvalidFileNameChars method. -or- path refers to an invalid device. |
| ArgumentNullException | path is null. |
| IOException | An I/O error occurred. |
| PathTooLongException | path exceeds the maximum length defined by the operating system. In Windows, paths must contain fewer than 248 characters, and file names must contain fewer than 260 characters. |
| SecurityException | The caller does not have the required permissions for the file. |
Available since 4.0