[haiku] Re: TEMP directory

  • From: scott mc <scottmc2@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sat, 10 Oct 2009 15:01:24 -0700

On Sat, Oct 10, 2009 at 12:57 PM, Michel Clasquin-Johnson
<clasqm@xxxxxxxxx> wrote:
> Does Haiku have a dedicated temporary directory that automatically gets
> cleaned up at shutdown? You know, like C:\WINDOWS\TEMP or /var/tmp?
>
> Thanks in advance
> Michel
> ---------------------
> Michel Clasquin-Johnson
> e-mail: clasqm@xxxxxxxxx
> website: http://www.reviewcentral.co.za/
>
>

use:
FINDDIR -l
on the command line to see the list of directories, running "finddir
B_COMMON_TEMP_DIRECTORY" returns what you are looking for.
It gives /boot/var/tmp here.  If you are writing a script, you can use
finddir, if you are writing a program use find_directory():
http://www.haiku-os.org/legacy-docs/bebook/BDirectory.html#find_directory
This is the preferred method, avoid using hardcoded paths where possible.
-scottmc

Other related posts: