;+ ; ; @file_comments ; if needed, define and create myuniquetmpdir ; (common variable from cm_general) and add it to !path ; ; @categories ; Utilities ; ; @examples ; IDL> def_myuniquetmpdir ; ; @uses ; cm_general ; ; @history ; Sebastien Masson (smasson\@lodyc.jussieu.fr) ; June 2005 ; ; @version ; $Id$ ; ;- ; PRO def_myuniquetmpdir ; compile_opt idl2, strictarrsubs ; @cm_general ; IF n_elements(myuniquetmpdir) EQ 0 THEN BEGIN ; define a new and unique directory in getenv('IDL_TMPDIR') by using systime(1) ; if possible, look for the login to make a more explicite name IF file_which(getenv('PATH'), 'whoami') ne '' THEN spawn, 'whoami', login, /noshell ELSE login = 'unknown' myuniquetmpdir = file_search(getenv('IDL_TMPDIR'), /mark_directory) myuniquetmpdir = myuniquetmpdir[0] + 'saxo_' + login[0] + '.' $ + strtrim(long(systime(1)), 1) + '/' ; create it file_mkdir, myuniquetmpdir ; add it to !path !path = myuniquetmpdir + path_sep(/search_path) + !path ENDIF ; return end