source: trunk/SRC/Utilities/def_myuniquetmpdir.pro @ 93

Last change on this file since 93 was 93, checked in by pinsard, 18 years ago

start to modify headers of Calendar and Utilities *.pro files for bet
ter idldoc output

  • Property svn:executable set to *
File size: 946 bytes
Line 
1;+
2; if needed, define and create myuniquetmpdir
3; (common variable from cm_general) and add it to !path
4;
5; @categories utilities
6;
7; @examples
8; IDL> def_myuniquetmpdir
9;
10; @uses cm_general
11;
12; @file_comments SIDE EFFECTS: see purpose
13;
14; @history Sebastien Masson (smasson\@lodyc.jussieu.fr)
15;                      June 2005
16;
17;-
18PRO def_myuniquetmpdir
19@cm_general
20;
21 IF n_elements(myuniquetmpdir) EQ 0 THEN BEGIN
22; define a new and unique directory in getenv('IDL_TMPDIR') by using systime(1)
23; look for the login if we use "unix" system
24    IF !d.name EQ 'X' THEN spawn, 'whoami', login, /noshell ELSE login = 'idl'
25    myuniquetmpdir = file_search(getenv('IDL_TMPDIR'), /mark_directory)
26    myuniquetmpdir = myuniquetmpdir[0] + login[0] + '.' $
27                  + strtrim(long(systime(1)), 1) + '/'
28; create it
29    file_mkdir, myuniquetmpdir
30; add it to !path
31    !path = !path+ ':' + expand_path(myuniquetmpdir)
32  ENDIF
33;
34
35  return
36end
Note: See TracBrowser for help on using the repository browser.