Created
September 6, 2016 04:18
-
-
Save marianomike/8cbc36cb5c56da5ad51e2f08c66e306f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create variable to check if clicked | |
var clicked = [panel runModal]; | |
//check if clicked | |
if (clicked == NSFileHandlingPanelOKButton) { | |
var isDirectory = true; | |
//get the folder path | |
var firstURL = [[panel URLs] objectAtIndex:0]; | |
//format it to a string | |
var file_path = [NSString stringWithFormat:@"%@", firstURL]; | |
//remove the file:// path from string | |
if (0 === file_path.indexOf("file://")) { | |
file_path = file_path.substring(7); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment