function FileSystemInterface::getDestinationFilename

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::getDestinationFilename()
  2. 10 core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::getDestinationFilename()
  3. 11.x core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::getDestinationFilename()

Determines the destination path for a file.

Parameters

string $destination: The desired final URI or filepath.

int $replace: Replace behavior when the destination file already exists.

Return value

string|bool The destination filepath, or FALSE if the file already exists and FileSystemInterface::EXISTS_ERROR is specified.

Throws

\Drupal\Core\File\Exception\FileException Implementation may throw FileException or its subtype on failure.

1 method overrides FileSystemInterface::getDestinationFilename()
FileSystem::getDestinationFilename in core/lib/Drupal/Core/File/FileSystem.php
Determines the destination path for a file.

File

core/lib/Drupal/Core/File/FileSystemInterface.php, line 448

Class

FileSystemInterface
Provides an interface for helpers that operate on files and stream wrappers.

Namespace

Drupal\Core\File

Code

public function getDestinationFilename($destination, $replace);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.