Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSFileWrapperMBS class.
NSFileWrapperMBS.Directory as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This property will contain true when the file wrapper is a directory file wrapper, otherwise it contains false.
Invocations of readFromURL may change the value of this property, if the type of the file on disk has changed.
(Read only property)
NSFileWrapperMBS.fileAttributes as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The file attributes’ dictionary is the same format as that returned by attributesOfItemAtPath (see NSFileManagerMBS).
(Read and Write property)
NSFileWrapperMBS.filename as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This property contains the file wrapper’s filename, or nil when the file wrapper has no corresponding file-system node.
The filename is used for record-keeping purposes only and is set automatically when the file wrapper is created from the file system using initWithURL and when it’s saved to the file system using writeToURL (although this method allows you to request that the filename not be updated).
The filename is usually the same as the preferred filename, but might instead be a name derived from the preferred filename. You can use this method to get the name of a child that's just been read. Don’t use this method to get the name of a child that's about to be written, because the name might be about to change; send keyForFileWrapper to the parent instead.
(Read and Write property)
NSFileWrapperMBS.fileWrappers as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 16.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The dictionary contains entries whose values are the file wrappers and whose keys are the unique filenames that have been assigned to each one. See Working with Directory Wrappers in File System Programming Guide for more information about the file-wrapper list structure.
This property may contain nil if the user modifies the directory after you call readFromURL or initWithURL but before NSFileWrapper has read the contents of the directory. Use the NSFileWrapperReadingImmediate reading option to reduce the likelihood of that problem.
This property raises NSInternalInconsistencyException if the file wrapper object is not a directory file wrapper.
(Read only property)
NSFileWrapperMBS.Handle as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Must not be 0 to have the object being valid.
(Read and Write property)
NSFileWrapperMBS.icon as NSImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An application does not have to use this icon; for example, a file viewer typically looks up icons automatically based on file extensions, and so wouldn’t need this one. Similarly, if a file wrapper represents an image file, an application can display the image directly rather than a file icon.
This method may return nil if the file wrapper is a child created when its parent was read from the file system, and the child was modified before it was read. Use the NSFileWrapperReadingImmediate reading option to reduce the likelihood of that problem.
Because the NSImage object that's returned might be shared by many NSFileWrapper objects, you must not mutate it. If you need to mutate the returned object, make a copy first and mutate the copy instead.
(Read and Write property)
NSFileWrapperMBS.preferredFilename as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This name is normally used as the dictionary key when a child file wrapper is added to a directory file wrapper. However, if another file wrapper with the same preferred name already exists in the directory file wrapper when this object is added, the filename assigned as the dictionary key may differ from the preferred filename.
When you change the preferred filename, the default implementation of this property causes the existing parent directory file wrappers to remove and re-add the child to accommodate the change. Preferred filenames of children are not preserved when you write a file wrapper to disk and then later instantiate another file wrapper by reading the file from disk. If you need to preserve the user-visible names of attachments, you have to store the names yourself.
(Read and Write property)
NSFileWrapperMBS.RegularFile as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This property contains true when the file wrapper object is a regular-file wrapper, otherwise it contains false. Invocations of readFromURL may change the value of this property if the type of the file on disk has changed.
(Read only property)
NSFileWrapperMBS.regularFileContents as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This property may contain nil if the user modifies the file after you call readFromURL or initWithURL but before NSFileWrapper has read the contents of the file. Use the NSFileWrapperReadingImmediate reading option to reduce the likelihood of that problem.
This property raises NSInternalInconsistencyException if the file wrapper object is not a regular-file file wrapper.
(Read only property)
NSFileWrapperMBS.serializedRepresentation as MemoryBlock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This property contains an MemoryBlock in the format used by the pasteboard type NSFileContentsPboardType. This MemoryBlock is also suitable for passing to initWithSerializedRepresentation.
This property may contain nil if the user modifies the contents of the file-system node after you call readFromURL or initWithURL/File but before NSFileWrapper has read the contents of the file. Use the NSFileWrapperReadingImmediate reading option to reduce the likelihood of that problem.
(Read only property)
NSFileWrapperMBS.SymbolicLink as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This property contains true when the file wrapper object is a symbolic-link file wrapper, false otherwise.
Invocations of readFromURL may change the value contained by this property, if the type of the file on disk has changed.
(Read only property)
NSFileWrapperMBS.symbolicLinkDestinationURL as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Text | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This property may contain nil if the user modifies the symbolic link after you call readFromURL or initWithURL but before NSFileWrapper has read the contents of the link. Use the NSFileWrapperReadingImmediate reading option to reduce the likelihood of that problem.
This property raises NSInternalInconsistencyException if the file wrapper object is not a symbolic-link file wrapper.
(Read only property)
The items on this page are in the following plugins: MBS MacBase Plugin.