MonobjcMonobjc Documented Class Library
AddRegularFileWithContentsPreferredFilename Method (data, filename)
NamespacesMonobjc.AppKitNSFileWrapperAddRegularFileWithContentsPreferredFilename(NSData, NSString)

Creates a regular-file file wrapper with the given contents and adds it to the receiver, which must be a directory file wrapper.

Original signature is '- (NSString *)addRegularFileWithContents:(NSData *)data preferredFilename:(NSString *)filename'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSString AddRegularFileWithContentsPreferredFilename(
	NSData data,
	NSString filename
Public Overridable Function AddRegularFileWithContentsPreferredFilename ( _
	data As NSData, _
	filename As NSString _
) As NSString
virtual NSString^ AddRegularFileWithContentsPreferredFilename(
	NSData^ data, 
	NSString^ filename
data (NSData)
Contents for the new regular-file file wrapper.
filename (NSString)
Preferred filename for the new regular-file file wrapper.
Return Value
Dictionary key used to store the new file wrapper in the directory’s list of file wrappers. The dictionary key is a unique filename, which is the same as the passed-in file wrapper's preferred filename unless that name is already in use as a key in the directory's dictionary of children. See “Working With Directory Wrappers” in Application File Management for more information about the file-wrapper list structure.
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.AppKit (Module: Monobjc.AppKit)