Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: temporary files and subsequent cleanup



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.