MonobjcMonobjc Documented Class Library
InitWithContentsOfFile Method (aPath)
NamespacesMonobjc.FoundationNSArrayInitWithContentsOfFile(NSString)

Initializes a newly allocated array with the contents of the file specified by a given path.

Original signature is '- (id)initWithContentsOfFile:(NSString *)aPath'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual Id InitWithContentsOfFile(
	NSString aPath
)
Public Overridable Function InitWithContentsOfFile ( _
	aPath As NSString _
) As Id
public:
virtual Id^ InitWithContentsOfFile(
	NSString^ aPath
)
Parameters
aPath (NSString)
The path to a file containing a string representation of an array produced by the writeToFile:atomically: method.
Return Value
An array initialized to contain the contents of the file specified by aPath or nil if the file can’t be opened or the contents of the file can’t be parsed into an array. 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)

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