Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (12 sloc) 529 Bytes
#import "NSAppleEventDescriptor-Extensions.h"
@implementation NSAppleEventDescriptor(Extensions)
+ (NSAppleEventDescriptor *)descriptorWithFilePath:(NSString *)fileName {
NSURL *url = [NSURL fileURLWithPath: fileName];
return [self descriptorWithFileURL: url];
}
+ (NSAppleEventDescriptor *)descriptorWithFileURL:(NSURL *)fileURL {
NSString *string = [fileURL absoluteString];
NSData *data = [string dataUsingEncoding: NSUTF8StringEncoding];
return [self descriptorWithDescriptorType: typeFileURL data: data];
}
@end
Jump to Line
Something went wrong with that request. Please try again.