MonobjcMonobjc Documented Class Library
DataWithContentsOfFile Method (path)
NamespacesMonobjc.FoundationNSDataDataWithContentsOfFile(NSString)

Creates and returns a data object by reading every byte from the file specified by a given path.

Original signature is '+ (id)dataWithContentsOfFile:(NSString *)path'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static NSData DataWithContentsOfFile(
	NSString path
)
Public Shared Function DataWithContentsOfFile ( _
	path As NSString _
) As NSData
public:
static NSData^ DataWithContentsOfFile(
	NSString^ path
)
Parameters
path (NSString)
The absolute path of the file from which to read data.
Return Value
A data object by reading every byte from the file specified by path. Returns nil if the data object could not be created.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)