atr_tmp_dir

Versions
6.1
atr_tmp_dir()

Create a temporary directory.

@result The path to the temporary directory or FALSE upon failure.

▾ 1 function calls atr_tmp_dir()

atr_file_get in atr/includes/atr.extract.inc
Get a file and put it in a temporary directory.

Code

atr/atr.module, line 528

<?php
function atr_tmp_dir() {
  $dir = '/' . trim(sys_get_temp_dir(), '/') . '/atr/' . time() . mt_rand(100, 999);
  if (@mkdir($dir, 0766, TRUE)) {
    return $dir;
  }
  else {
    watchdog('atr', "Automated Text Review has insufficient permissions to write to your system's temporary directory (%directory)", array('%directory' => sys_get_temp_dir()), WATCHDOG_ERROR);
    return FALSE;
  }
}
?>