Questions tagged [nsfilewrapper]

On iOS and Mac OS X, the NSFileWrapper class provides access to the attributes and contents of file-system nodes. A file-system node is a file, directory, or symbolic link. Instances of this class are known as file wrappers.

On iOS and Mac OS X, the NSFileWrapper class provides access to the attributes and contents of file-system nodes. A file-system node is a file, directory, or symbolic link. Instances of this class are known as file wrappers.

File wrappers represent a file-system node as an object that can be displayed as an image (and possibly edited in place), saved to the file system, or transmitted to another application.

There are three types of file wrappers:

  • Regular-file file wrapper: Represents a regular file.
  • Directory file wrapper: Represents a directory.
  • Symbolic-link file wrapper: Represents a symbolic link.

A file wrapper has these attributes:

  • Filename. Name of the file-system node the file wrapper represents.
  • file-system attributes. See NSFileManager Class Reference for information on the contents of the attributes dictionary.
  • Regular-file contents. Applicable only to regular-file file wrappers.
  • File wrappers. Applicable only to directory file wrappers.
  • Destination node. Applicable only to symbolic-link file wrappers.
81 questions
0
votes
1 answer

NSDocument and NSFileWrapping saving bad names

My NSDocument subclass using a bundle document type which uses fileWrapperOfType:error: to write data to disk. This works perfectly but eventually it will start to save files with garbled names like "2_#$!@%!#_info.plist" instead of overwriting the…
GenericPtr
  • 677
  • 1
  • 8
  • 18
0
votes
1 answer

Is an NSFileWrapper package similar to a Mac OS X Package (pkg)?

In numerous places, the Apple documentation talks about packages of files (e.g. for iCloud) created by NSFileWrapper. Is this is any way similar to the .pkg format used to hide a folder as a single file on the OS X platform? I have an app with…
Richard
  • 388
  • 2
  • 5
0
votes
1 answer

NSFileWrapper Error Writing to URL

I've got an archive I'm trying copy the contents of into the Documents directory. It works fine in the simulator but aborts with an error on a device. - (BOOL)importData:(NSData *)zippedData { // Read data into a dir Wrapper NSData…
0
votes
1 answer

Key not found in an NSKeyedUnarchiver object

I usually encode my data in a NSFileWrapper like this (I leave out the NSFileWrapper bit): -(NSData*)encodeObject:(id)o { @autoreleasepool { NSMutableData *data = [NSMutableData data]; …
n.evermind
  • 11,944
  • 19
  • 78
  • 122
0
votes
1 answer

how to show gif image in NSTextView

I am new to mac developing. I am developing an app about richEdit by subclassing NSTextView. In my customized textView, I can insert image like .bmp .jpeg .png. Code is like this: NSTextAttachment* attachment; NSImage *image = [[NSImage alloc]…
scarlett
  • 9
  • 2
0
votes
1 answer

Play movie from NSFileWrapper in iOS

How do you play a movie given a NSFileWrapper? I expected to find a initWithData: constructor in MPMoviePlayerController (as in AVAudioPlayer), but only initWithContentURL: is provided.
hpique
  • 119,096
  • 131
  • 338
  • 476
1 2 3 4 5
6