Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FileSystemInterface.php

function FileSystemInterface::getDestinationFilename

Determines the destination path for a file.

Parameters

string $destination: The desired final URI or filepath.

\Drupal\Core\File\FileExists|int $fileExists: Replace behavior when the destination file already exists.

Return value

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

Throws

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

\ValueError Thrown if $fileExists is a legacy int and not a valid value.

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 468

Class

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

Namespace

Drupal\Core\File

Code

public function getDestinationFilename($destination, $fileExists);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal