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

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

start to modify headers of Obsolete *.pro files for better idldoc output

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