I am working on extracting the POSIX path to a folder or file from NSPathControl after deleting the file or folder on it.
I am new, but I managed to get the value from the control (called Destination ) in my code as follows:
NSString *filepath; filepath = [Destination stringValue];
It gives me something like
file: // test / My% 20New% 20Project /
but I would like to have it in the form of a POSIX path:
/ test / My New Project
because I need to pass it to
NSTask using the command line.
Any suggestion on how to convert the contents of this NSString from a URL format to a POSIX path?
opoloko
source share