Returns a data object initialized by reading into it the data from the file specified by a given path.
Original signature is '- (id)initWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)mask error:(NSError **)errorPtr'
Available in Mac OS X v10.4 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public NSData( NSString path, NSDataReadingOptions mask, out NSError errorPtr )
Public Sub New ( _ path As NSString, _ mask As NSDataReadingOptions, _ <OutAttribute> ByRef errorPtr As NSError _ )
public: NSData( NSString^ path, NSDataReadingOptions mask, [OutAttribute] NSError^% errorPtr )
Parameters
- path (NSString)
- The absolute path of the file from which to read data.
- mask (NSDataReadingOptions)
- A mask that specifies options for reading the data. Constant components are described in “NSDataReadingOptions”.
- errorPtr (NSError%)
- If an error occurs, upon return contains an NSError object that describes the problem.
Return Value
A data object initialized by reading into it the data from the file specified by path. The returned object might be different than the original receiver.
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)