objective c - Getting Safari-Style File Path -
if open safari's preferences , navigate general, has drop-down menu next label 'save downloaded files to.' how safari-style volume name or whatever? i've done following. (i need file path.) don't same.
- (nsstring *)getvolumepath: (nsstring *)path { nsarray *urlarray = [path componentsseparatedbystring:@"/"]; nsstring *p = [urlarray objectatindex:2]; return p; }
apple, inc. says cannot show full path sandbox-protected folder assigned application. want show safari shows.
thank advice.
following codafi's suggestion, turns out simple following.
- (nsstring *)getlastpath: (nsstring *)path { return [path lastpathcomponent]; }
Comments
Post a Comment