Implemented extension methods for NSURL.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11509 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-11-24 15:51:39 +00:00
parent 7ebc8a71ba
commit a10f888c84

View file

@ -870,6 +870,21 @@ static NSMapTable *mimeMap = NULL;
@end
@implementation NSURL (NSPasteboard)
+ (NSURL *) URLFromPasteboard: (NSPasteboard *)pasteBoard
{
return [self URLWithString: [pasteBoard stringForType: NSURLPboardType]];
}
- (void) writeToPasteboard: (NSPasteboard *)pasteBoard
{
[pasteBoard setString: [self absoluteString]
forType: NSURLPboardType];
}
@end
static NSString* contentsPrefix = @"NSTypedFileContentsPboardType:";
static NSString* namePrefix = @"NSTypedFilenamesPboardType:";