first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
NSString *get_default_app_bundle_for_file(id);
|
||||
@@ -1,15 +0,0 @@
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
NSString *get_default_app_bundle_for_file(NSString *file_path) {
|
||||
NSURL *fileUrl = [NSURL fileURLWithPath:file_path];
|
||||
NSURL *appUrl = [[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:fileUrl];
|
||||
if (!appUrl) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSBundle *appBundle = [NSBundle bundleWithURL:appUrl];
|
||||
if (!appBundle) {
|
||||
return nil;
|
||||
}
|
||||
return [appBundle bundleIdentifier];
|
||||
}
|
||||
Reference in New Issue
Block a user