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

Breadcrumb

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

function 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 323

Class

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

Namespace

Drupal\Core\File

Code

public function delete($path);

API Navigation

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