May 2003
Intermediate to advanced
566 pages
27h 29m
English
NSFileWrapper — Mac OS X 10.0
This class is used to represent a file, or a set of files
contained in
a file package, as a single unit of information in a document or
application. NSFileWrapper is often used in
conjunction with subclasses of NSDocument as a
means of conveniently managing a document’s data.
This class provides functionality that allows clients to edit file
attributes and perform file operations. Additionally, clients may
assign an icon to represent the file wrapper object in dragging
operations.
|
|
@interface NSFileWrapper : NSObject <NSCoding>
|
// Initializers
|
- (id)initDirectoryWithFileWrappers:(NSDictionary *)docs; |
- (id)initRegularFileWithContents:(NSData *)data; |
- (id)initSymbolicLinkWithDestination:(NSString *)path; |
- (id)initWithPath:(NSString *)path; |
- (id)initWithSerializedRepresentation:(NSData *)data; |
// Accessor Methods
|
- (void)setFilename:(NSString *)filename; |
- (NSString *)filename;
|
- (void)setIcon:(NSImage *)icon; |
- (NSImage *)icon;
|
- (void)setFileAttributes:(NSDictionary *)attributes; |
- (NSDictionary *)fileAttributes;
|
- (void)setPreferredFilename:(NSString *)filename; |
- (NSString *)preferredFilename;
|
// Instance Methods
|
- (NSString *)addFileWithPath:(NSString *)path; |
- (NSString *)addFileWrapper:(NSFileWrapper *)doc; |
- (NSString *)addRegularFileWithContents:(NSData *)data preferredFilename:(NSString ... |
Read now
Unlock full access