public function FileSystemInterface::createFilename in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::createFilename()
Creates a full file path from a directory and filename.
If a file with the specified name already exists, an alternative will be used.
Parameters
string $basename: The filename.
string $directory: The directory or parent URI.
Return value
string File path consisting of $directory and a unique filename based off of $basename.
Throws
\Drupal\Core\File\Exception\FileException Implementation may throw FileException or its subtype on failure.
1 method overrides FileSystemInterface::createFilename()
- FileSystem::createFilename in core/
lib/ Drupal/ Core/ File/ FileSystem.php - Creates a full file path from a directory and filename.
File
- core/
lib/ Drupal/ Core/ File/ FileSystemInterface.php, line 428
Class
- FileSystemInterface
- Provides an interface for helpers that operate on files and stream wrappers.
Namespace
Drupal\Core\FileCode
public function createFilename($basename, $directory);