当前位置: 动力学知识库 > 问答 > 编程问答 >

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")?

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: