开发者

Where is NSTemproryDirectory present?

开发者 https://www.devze.com 2022-12-13 11:13 出处:网络
I am doing image caching and I am saving the files to a temporary directory NSTemporaryDirectory. Its seen in log as /var/folder开发者_如何学JAVAs/.... .Where is this thing present. I am currently doi

I am doing image caching and I am saving the files to a temporary directory NSTemporaryDirectory. Its seen in log as /var/folder开发者_如何学JAVAs/.... .Where is this thing present. I am currently doing all this in the simulator?


You can use the following line to find out:

NSLog(NSTemporaryDirectory());

Gives me the path path like this: /var/folders/c9/c9ooh947H2WloiBIdpTdcU+++TI/-Tmp-/

You can browse there in terminal:

cd /var/folders/c9/c9ooh947H2WloiBIdpTdcU+++TI/-Tmp-/

/var folder is hidden on MacOS and is not shown in Finder by default. You can switch on showing hidden folders using this terminal command:

defaults write com.apple.finder AppleShowAllFiles -bool true

After that it must become visible in Finder in root folder

0

精彩评论

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

关注公众号