You are here

public function FileSystemInterface::getDestinationFilename in Drupal 8

Same name and namespace in other branches
  1. 9 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 475

Class

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

Namespace

Drupal\Core\File

Code

public function getDestinationFilename($destination, $replace);