MonoMac.Foundation.NSData.FromFile Method
Creates an NSData by loading the contents of the specified file into memory.

Syntax

[MonoMac.Foundation.Export("dataWithContentsOfFile:")]
public static NSData FromFile (string path)

Parameters

path
Path to the filename to wrap as an NSData.

Returns

Newly created NSData object exposing the contents of the file, or null on error.

Remarks

This version of FromFile loads the contents of the file into memory on startup, use the NSData.FromFile(string, NSDataReadingOptions, Error) to use mmap.

Requirements

Namespace: MonoMac.Foundation
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0