public FileSystemInterface::tempnam($directory, $prefix)
Creates a file with a unique filename in the specified directory.
PHP's tempnam() does not return a URI like we want. This function will return a URI if given a URI, or it will return a filepath if given a filepath.
Compatibility: normal paths and stream wrappers.
string $directory: The directory where the temporary filename will be created.
string $prefix: The prefix of the generated temporary filename. Note: Windows uses only the first three characters of prefix.
string|bool The new temporary filename, or FALSE on failure.
tempnam()
https://www.drupal.org/node/515192
public function tempnam($directory, $prefix);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!File!FileSystemInterface.php/function/FileSystemInterface::tempnam/8.1.x