MonobjcMonobjc Documented Class Library
URLForDirectoryInDomainAppropriateForURLCreateError Method (directory, domain, url, shouldCreate, error)
NamespacesMonobjc.FoundationNSFileManagerURLForDirectoryInDomainAppropriateForURLCreateError(NSSearchPathDirectory, NSSearchPathDomainMask, NSURL, Boolean, NSError%)

Locates and optionally creates the specified common directory in a domain.

Original signature is '- (NSURL *)URLForDirectory:(NSSearchPathDirectory)directory inDomain:(NSSearchPathDomainMask)domain appropriateForURL:(NSURL *)url create:(BOOL)shouldCreate error:(NSError **)error'

Available in Mac OS X v10.6 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSURL URLForDirectoryInDomainAppropriateForURLCreateError(
	NSSearchPathDirectory directory,
	NSSearchPathDomainMask domain,
	NSURL url,
	bool shouldCreate,
	out NSError error
)
Public Overridable Function URLForDirectoryInDomainAppropriateForURLCreateError ( _
	directory As NSSearchPathDirectory, _
	domain As NSSearchPathDomainMask, _
	url As NSURL, _
	shouldCreate As Boolean, _
	<OutAttribute> ByRef error As NSError _
) As NSURL
public:
virtual NSURL^ URLForDirectoryInDomainAppropriateForURLCreateError(
	NSSearchPathDirectory directory, 
	NSSearchPathDomainMask domain, 
	NSURL^ url, 
	bool shouldCreate, 
	[OutAttribute] NSError^% error
)
Parameters
directory (NSSearchPathDirectory)
The search path directory. The supported values are described in NSSearchPathDirectory.
domain (NSSearchPathDomainMask)
The domain specifies where the search should occur. The constants are specified by NSSearchPathDomainMask. Note: You may not pass the NSAllDomainsMask.
url (NSURL)
If not NULL, and directory is NSItemReplacementDirectory the appropriate temporary directory will be located. If the URL is located on another machine, the temporary directory will be on the other machine. If the URL is local, the temporary directory will be local.
shouldCreate (Boolean)
YES if the directory should be created if it doesn’t exist, otherwise NO.
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
Returns an NSURL specifying the directory, or nil if an error was encountered.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later)

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