function drush_tempdir

8.0.x filesystem.inc drush_tempdir()
6.x filesystem.inc drush_tempdir()
7.x filesystem.inc drush_tempdir()
4.x drush.inc drush_tempdir()
5.x filesystem.inc drush_tempdir()
master filesystem.inc drush_tempdir()

Creates a temporary directory and return its path.

Related topics

3 calls to drush_tempdir()
drush_archive_dump in commands/core/archive.drush.inc
Command callback. Generate site archive file.
drush_archive_restore in commands/core/archive.drush.inc
Command callback. Restore web site(s) from a site archive file.
drush_pm_download in commands/pm/pm.drush.inc
Command callback. Download Drupal core or any project.

File

includes/drush.inc, line 1879
The drush API implementation and helpers.

Code

function drush_tempdir() {
  $tmp_dir = rtrim(drush_find_tmp(), DIRECTORY_SEPARATOR);
  $tmp_dir .= '/' . 'drush_tmp_' . time();

  drush_mkdir($tmp_dir);
  drush_register_file_for_deletion($tmp_dir);

  return $tmp_dir;
}