Previous | Index | Next |
Specialist conversion methods
HFSPathFromURL:
Pass an NSURL, and the HFS path is returned. Directories will have a trailing colon; packages will not
+ (NSString *)HFSPathFromURL:(NSURL *)theUrl
theUrl = an NSURL
A string
Version 1.0.0
If possible, use BridgePlus script library’s ASify from command instead.
use scripting additions
use framework "Foundation"
use script "BridgePlus"
load framework
set aURL to Cocoaify (path to desktop)
--> (NSURL) file:///Users/shane/Desktop/
set theResult to current application's SMSForder's HFSPathFromURL:aURL
theResult as text
--> file "Macintosh HD:Users:shane:Desktop:"