开发者

Tilde-based Paths in Objective-C

开发者 https://www.devze.com 2022-12-11 01:23 出处:网络
In Objective-C, how do I go about converting tilde-based pathnames to full pathnames? That is, I\'d like to convert fr开发者_如何学JAVAom ~/sandbox to /Users/TheBobs/sandbox.Use NSString\'s stringByEx

In Objective-C, how do I go about converting tilde-based pathnames to full pathnames? That is, I'd like to convert fr开发者_如何学JAVAom ~/sandbox to /Users/TheBobs/sandbox.


Use NSString's stringByExpandingTildeInPath: method.

There are also several other methods that make it easy to work with paths.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号