You are here

function drupal_unlink in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/includes/file.inc \drupal_unlink()

Deletes a file.

Deprecated

in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::unlink().

Related topics

21 calls to drupal_unlink()
ArchiveTar::_cleanFile in core/lib/Drupal/Core/Archiver/ArchiveTar.php
ArchiveTar::_close in core/lib/Drupal/Core/Archiver/ArchiveTar.php
ArchiveTar::_extractList in core/lib/Drupal/Core/Archiver/ArchiveTar.php
ArchiveTar::_openAppend in core/lib/Drupal/Core/Archiver/ArchiveTar.php
ArchiveTar::__destruct in core/lib/Drupal/Core/Archiver/ArchiveTar.php

... See full list

File

core/includes/file.inc, line 1034
API for handling file uploads and server file management.

Code

function drupal_unlink($uri, $context = NULL) {
  return \Drupal::service('file_system')
    ->unlink($uri, $context);
}