PHP Function Reference

PHP streamWrapper unlink() Method



The PHP streamWrapper::unlink() method deletes a file. This method is called in response to unlink() function.

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.

Syntax

public streamWrapper::unlink(path)

Parameters

path Required. Specify the file URL which should be deleted.

Return Value

Returns true on success or false on failure.

Exceptions

Emits E_WARNING if call to this method fails (i.e. not implemented).

Note: The streamWrapper::$context property is updated if a valid context is passed to the caller function.

❮ PHP Streams Reference