Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSFileWrapperMBS class.
NSFileWrapperMBS.NSFileWrapperReadingImmediate = 1
Type | Topic | Plugin | Version |
const | Cocoa Text | MBS MacBase Plugin | 15.0 |
If reading with this option succeeds, then subsequent uses of fileWrappers, regularFileContents, symbolicLinkDestinationURL, and serializedRepresentation sent to the file wrapper and all its child file wrappers will fail and return nil only if an actual error occurs (for example, the volume has disappeared or the file server is unreachable)—not as a result of the user moving or deleting files.
For performance reasons, NSFileWrapper may not read the contents of some file packages immediately even when this option is chosen. For example, because the contents of bundles (not all file packages are bundles) are immutable to the user, NSFileWrapper may read the children of such a directory lazily.
You can use this option to take a snapshot of a file or folder for writing later. For example, an application like TextEdit can use this option when creating new file wrappers to represent attachments that the user creates by copying and pasting or dragging and dropping from the Finder to a TextEdit document. Don't use this option when reading a document file package, because that would cause unnecessarily bad performance. For example, an application wouldn't use this option when creating file wrappers to represent attachments as it's opening a document stored in a file package.
Available in OS X v10.6 and later.
NSFileWrapperMBS.NSFileWrapperReadingWithoutMapping = 2
Type | Topic | Plugin | Version |
const | Cocoa Text | MBS MacBase Plugin | 15.0 |
Whether file mapping for regular file wrappers is disallowed.
You can use this option to keep NSFileWrapper from memory-mapping files. This is useful if you want to make sure your application doesn't hold files open (mapped files are open files), therefore preventing the user from ejecting DVDs, unmounting disk partitions, or unmounting disk images. In OS X v10.6 and later, NSFileWrapper memory-maps files that are on internal drives only. It never memory-maps files on external drives or network volumes, regardless of whether this option is used.
Available in OS X v10.6 and later.
NSFileWrapperMBS.NSFileWrapperWritingAtomic = 1
Type | Topic | Plugin | Version |
const | Cocoa Text | MBS MacBase Plugin | 15.0 |
Whether writing is done atomically.
You can use this option to ensure that, when overwriting a file package, the overwriting either completely succeeds or completely fails, with no possibility of leaving the file package in an inconsistent state. Because this option causes additional I/O, you shouldn't use it unnecessarily. For example, don't use this option in an override of -[NSDocument writeToURL], because NSDocument safe-saving is already done atomically.
Available in OS X v10.6 and later.
NSFileWrapperMBS.NSFileWrapperWritingWithNameUpdating = 2
Type | Topic | Plugin | Version |
const | Cocoa Text | MBS MacBase Plugin | 15.0 |
Whether descendant file wrappers’filename properties are set if the writing succeeds.
This option is necessary when your application passes a URL in the originalContentsURL parameter to the writeToURL method. Without using this option (and reusing child file wrappers properly), subsequent invocations of writeToURL would not be able to reliably create hard links in a new file package, because the record of names in the old file package would be out of date.
Available in OS X v10.6 and later.
The items on this page are in the following plugins: MBS MacBase Plugin.