MonobjcMonobjc Documented Class Library
WriteToFileAtomically Method (path, flag)
NamespacesMonobjc.FoundationNSArrayWriteToFileAtomically(NSString, Boolean)

Writes the contents of the array to a file at a given path.

Original signature is '- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flag'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual bool WriteToFileAtomically(
	NSString path,
	bool flag
)
Public Overridable Function WriteToFileAtomically ( _
	path As NSString, _
	flag As Boolean _
) As Boolean
public:
virtual bool WriteToFileAtomically(
	NSString^ path, 
	bool flag
)
Parameters
path (NSString)
The path at which to write the contents of the array.
flag (Boolean)
If YES, the array is written to an auxiliary file, and then the auxiliary file is renamed to path. If NO, the array is written directly to path. The YES option guarantees that path, if it exists at all, won’t be corrupted even if the system should crash during writing.
Return Value
YES if the file is written successfully, otherwise NO.
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)