MonobjcMonobjc Documented Class Library
ContentsOfDirectoryAtPathError Method (path, error)
NamespacesMonobjc.FoundationNSFileManagerContentsOfDirectoryAtPathError(NSString, NSError%)

Returns the directories and files (including symbolic links) contained in a given directory.

Original signature is '- (NSArray *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSArray ContentsOfDirectoryAtPathError(
	NSString path,
	out NSError error
)
Public Overridable Function ContentsOfDirectoryAtPathError ( _
	path As NSString, _
	<OutAttribute> ByRef error As NSError _
) As NSArray
public:
virtual NSArray^ ContentsOfDirectoryAtPathError(
	NSString^ path, 
	[OutAttribute] NSError^% error
)
Parameters
path (NSString)
A path to a directory.
error (NSError%)
If an error occurs, upon return contains an NSError object that describes the problem. Pass NULL if you do not want error information.
Return Value
An array of NSString objects identifying the directories and files (including symbolic links) contained in path. Returns an empty array if the directory exists but has no contents. Returns nil if the directory specified at path does not exist or there is some other error accessing it.
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)