[haiku] Re: TEMP directory

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sun, 11 Oct 2009 00:11:27 +0200 CEST

> 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.

Right, though for that one if you just want to write portable code it 
is probably safe to assume /tmp.

François.

Other related posts: