MonobjcMonobjc Documented Class Library
WriteToURLAtomicallyEncodingError Method (url, useAuxiliaryFile, enc, error)
NamespacesMonobjc.FoundationNSStringWriteToURLAtomicallyEncodingError(NSURL, Boolean, NSStringEncoding, NSError%)

Writes the contents of the receiver to the URL specified by url using the specified encoding.

Original signature is '- (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)useAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error'

Available in Mac OS X v10.4 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual bool WriteToURLAtomicallyEncodingError(
	NSURL url,
	bool useAuxiliaryFile,
	NSStringEncoding enc,
	out NSError error
)
Public Overridable Function WriteToURLAtomicallyEncodingError ( _
	url As NSURL, _
	useAuxiliaryFile As Boolean, _
	enc As NSStringEncoding, _
	<OutAttribute> ByRef error As NSError _
) As Boolean
public:
virtual bool WriteToURLAtomicallyEncodingError(
	NSURL^ url, 
	bool useAuxiliaryFile, 
	NSStringEncoding enc, 
	[OutAttribute] NSError^% error
)
Parameters
url (NSURL)
The URL to which to write the receiver.
useAuxiliaryFile (Boolean)
If YES, the receiver is written to an auxiliary file, and then the auxiliary file is renamed to url. If NO, the receiver is written directly to url. The YES option guarantees that url, if it exists at all, won’t be corrupted even if the system should crash during writing.
enc (NSStringEncoding)
The encoding to use for the output.
error (NSError%)
If there is an error, upon return contains an NSError object that describes the problem. If you are not interested in details of errors, you may pass in NULL.
Return Value
YES if the URL is written successfully, otherwise NO (if there was a problem writing to the URL or with the encoding).
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)