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
RevLine 
[11]1;+
[93]2; if needed, define and create myuniquetmpdir
3; (common variable from cm_general) and add it to !path
[11]4;
[93]5; @categories utilities
[11]6;
[93]7; @examples
8; IDL> def_myuniquetmpdir
[11]9;
[93]10; @uses cm_general
[11]11;
[93]12; @file_comments SIDE EFFECTS: see purpose
[11]13;
[93]14; @history Sebastien Masson (smasson\@lodyc.jussieu.fr)
[11]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.