function FileSystemInterface::delete

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

Deletes a file without database changes or hook invocations.

This function should be used when the file to be deleted does not have an entry recorded in the files table.

Parameters

string $path: A string containing a file path or (streamwrapper) URI.

Throws

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

1 method overrides FileSystemInterface::delete()
FileSystem::delete in core/lib/Drupal/Core/File/FileSystem.php
Deletes a file without database changes or hook invocations.

File

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

Class

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

Namespace

Drupal\Core\File

Code

public function delete($path);

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