home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / CLIPB52.ZIP / SCHINKEL.ZIP / TEMPDIR.PRG < prev    next >
Encoding:
Text File  |  1990-05-17  |  1.0 KB  |  32 lines

  1. /*
  2.    TEMPDIR.PRG - Function returns the name of a temporary directory.
  3.  
  4.    TEMPDIR() returns a path spec for storing temporary files.
  5.    The idea behind this function is to provide an encapsulated
  6.    reference to a directory that should be at least as fast access
  7.    wise as the current directory. Typically, that means a RAM
  8.    disk. It *CURRENTLY* returns the value of the DOS
  9.    environmental variable "TEMPDIR"
  10.  
  11.    NOTE: This function does not guarantee exclusive use of the
  12.    directory.
  13.  
  14.    SWITCHES: /n /w /m
  15.  
  16.    Copyright (c) 1990; The DSW Group, Ltd.
  17.    All Rights Reserved
  18.  
  19. */
  20. *...........................................................................
  21. // TempDir() -> cPathSpecForTempFiles
  22.  
  23. FUNC TempDir()
  24. STATIC cPathSpec
  25.    IF (cPathSpec==NIL)               // Only do this the first time
  26.       cPathSpec:= GETE("TEMPDIR")    // Get the path from DOS env
  27.    ENDIF
  28. RETURN(cPathSpec)
  29.  
  30. *...........................................................................
  31. * EOF: TEMPDIR.PRG
  32.