You are here

public function S3fsFileService::unlink in S3 File System 4.0.x

Same name and namespace in other branches
  1. 8.3 src/S3fsFileService.php \Drupal\s3fs\S3fsFileService::unlink()

Deletes a file.

PHP's unlink() is broken on Windows, as it can fail to remove a file when it has a read-only flag set.

Parameters

string $uri: A URI or pathname.

resource $context: Refer to http://php.net/manual/ref.stream.php

Return value

bool Boolean TRUE on success, or FALSE on failure.

Overrides FileSystemInterface::unlink

See also

unlink()

File

src/S3fsFileService.php, line 137

Class

S3fsFileService
Provides helpers to operate on files and stream wrappers.

Namespace

Drupal\s3fs

Code

public function unlink($uri, $context = NULL) {
  return $this->decorated
    ->unlink($uri, $context);
}