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

Breadcrumb

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

function vfsStreamWrapper::unlink

remove the data under the given path

Parameters

string $path:

Return value

bool

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php, line 743

Class

vfsStreamWrapper
Stream wrapper to mock file system requests.

Namespace

org\bovigo\vfs

Code

public function unlink($path) {
    $realPath = $this->resolvePath(vfsStream::path($path));
    $content = $this->getContent($realPath);
    if (null === $content) {
        trigger_error('unlink(' . $path . '): No such file or directory', E_USER_WARNING);
        return false;
    }
    if ($content->getType() !== vfsStreamContent::TYPE_FILE) {
        trigger_error('unlink(' . $path . '): Operation not permitted', E_USER_WARNING);
        return false;
    }
    return $this->doUnlink($realPath);
}

API Navigation

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