drupal_tempnam($directory, $prefix)
Creates a file with a unique filename in the specified directory.
Deprecated
in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::tempnam().
Related topics
- File interface
- Common file handling functions.
File
- core/includes/file.inc, line 1178
- API for handling file uploads and server file management.
Code
function drupal_tempnam($directory, $prefix) { return \Drupal::service('file_system')->tempnam($directory, $prefix); }
Please login to continue.