Re: temporary files and subsequent cleanup
Re: temporary files and subsequent cleanup
- Subject: Re: temporary files and subsequent cleanup
- From: Chris Heimark <email@hidden>
- Date: Fri, 26 Oct 2007 12:09:30 -0400
- Resent-date: Fri, 26 Oct 2007 12:12:42 -0400
- Resent-from: Chris Heimark <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: cocoadev <email@hidden>
I don't think they actually clear out /var/tmp. At least, on
Tiger, it looks like /var/tmp is only cleared out when you restart
the machine (from the /etc/rc script), and even then it only clears
out /var/tmp/folders.*, so things in /var/tmp will remain
indefinitely, which explains why I have files dated 2006 in that
folder on my Mac Pro. Arguably this is a bug.
Looks like you are right. A reboot got me:
[imacg5:~] chris% ls -al /private/var/tmp/folders.501/temporaryitems/
ls: /private/var/tmp/folders.501/temporaryitems/: No such file or
directory
Few minutes later, I tried again:
[imacg5:~] chris% ls -al /private/var/tmp/folders.501/temporaryitems/
total 0
drwxr-xr-x 2 chris wheel 68 Oct 26 12:02 .
drwx------ 3 chris wheel 102 Oct 26 12:02 ..
[imacg5:~] chris%
So apparently you never have to reboot ;-)
I think the /var/tmp folder, BTW, is the one that you get if you
ask various Carbon/Cocoa APIs for a temporary folder.
If by that, you mean NSTemporaryDirectory(), I get /private/var/tmp/
folders.501/temporaryitems/. Do you mean lower level BSD calls?
Thanks for your informed responses!
Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden