php8.5
Home/ Manual/ stream / streamwrapper/ streamWrapper::unlink

streamWrapper::unlink

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Delete a file

Description

streamWrapper::unlink(string $path): bool

This method is called in response to unlink().

Note

In order for the appropriate error message to be returned this method should not be defined if the wrapper does not support removing files.

Parameters

path

The file URL which should be deleted.

Return Values

Success

Errors/Exceptions Warning

Notes Context

See Also

Source: reference/stream/streamwrapper/unlink.xml · from the official PHP manual (php/doc-en)