# cf.TEMPDIR

`cf.``TEMPDIR`(*arg)

  The directory for internally generated temporary files.

  When setting the directory, it is created if the specified path does not exist.

  Parameters: | arg : str, optional The new directory for temporary files. Tilde expansion (an initial component of `~` or `~user` is replaced by that user’s home directory) and environment variable expansion (substrings of the form `$name` or `${name}` are replaced by the value of environment variable name) are applied to the new directory name. The default is to not change the directory.
  Returns: | out: `str` The directory prior to the change, or the current directory if no new value was specified.
  Examples: |

      >>> cf.TEMPDIR()
      '/tmp'
      >>> old = cf.TEMPDIR('/home/me/tmp')
      >>> cf.TEMPDIR(old)
      '/home/me/tmp'
      >>> cf.TEMPDIR()
      '/tmp'