NSFileWrapper:keyForFileWrapper:
Home 目次>ApplicationKit>NSFileWrapper

keyForFileWrapper:

ディレクトリラッパに含まれるファイルラッパの検索キーを返します


-(NSString *) keyForFileWrapper:(NSFileWrapper *)wrapper


【返り値】
   NSString *キー
【パラメータ】
   wrapperファイルラッパ


【解説】

ディレクトリラッパに含まれるファイルラッパの検索キーを返します。



【例文】


#import "MyObject.h"

@implementation MyObject

- (
IBAction )myAction:( id )sender
{
NSData *dat = [sender dataWithEPSInsideRect:[sender frame] ];
// ファイルラッパー

NSFileWrapper *theWrapper = [[NSFileWrapper alloc] initDirectoryWithFileWrappers:
nil ];

NSFileWrapper *theWrapper2 = [[NSFileWrapper alloc] initRegularFileWithContents:dat];

[theWrapper setPreferredFilename:
@"name1" ];
[theWrapper2 setPreferredFilename:
@"name2" ];
NSLog([theWrapper addFileWrapper:theWrapper2]);
NSLog([theWrapper keyForFileWrapper:theWrapper2]);
}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSFileWrapper
修正日2006.12.26