Stuart Tevendale
Stuart Tevendale

Reputation: 636

Convert Colon-Separated Path to NSURL

Is there a straight-forward way to convert a colon-separated path (i.e. "Macintosh HD:Users:stuarttevendale:Documents:DBTest.db") to an NSURL (i.e. "file://localhost/Users/stuarttevendale/Documents/DBTest.db")?

Upvotes: 0

Views: 220

Answers (1)

Ken Thomases
Ken Thomases

Reputation: 90521

Such paths are HFS-style paths. Use CFURLCreateWithFileSystemPath() with kCFURLHFSPathStyle.

Upvotes: 6

Related Questions