Previous Index

BridgePlus.framework, SMSForder Class Methods

Category

Specialist conversion methods

Method

HFSPathFromURL:colonForPackages:

Summary

As above, except you specify whether package paths have colons appended

Signature

+ (NSString *)HFSPathFromURL:(NSURL *)theUrl colonForPackages:(BOOL)colonForPackagesFlag

Parameters

theUrl = an NSURL

colonForPackagesFlag = whether to include trailing : in package paths

Result

A string

Availability

Version 1.0.0

Notes

If possible, use BridgePlus script library’s ASify from command instead.

Sample

use scripting additions

use framework "Foundation"

use script "BridgePlus"

load framework


set aURL to Cocoaify (choose file)

--> (NSURL) file:///Users/shane/Desktop/Untitled%204.scptd/

set theResult to current application's SMSForder's HFSPathFromURL:aURL colonForPackages:true

theResult as text

--> "Macintosh HD:Users:shane:Desktop:Untitled 4.scptd:"

set theResult to current application's SMSForder's HFSPathFromURL:aURL colonForPackages:false

theResult as text

--> "Macintosh HD:Users:shane:Desktop:Untitled 4.scptd"


Click here to open script in a script editor