• « streamWrapper::stream_write
  • streamWrapper::url_stat »
  • PHP Manual
  • streamWrapper
  • Delete a file

streamWrapper::unlink

(PHP 5, PHP 7)

streamWrapper::unlink — Delete a file

Descrição

public streamWrapper::unlink ( string $path ) : bool

This method is called in response to unlink().

Nota:

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

Parâmetros

path

The file URL which should be deleted.

Valor Retornado

Retorna true em caso de sucesso ou false em caso de falha.

Erros

Emite E_WARNING se uma chamada a essa função falha (não implementada, por exemplo).

Notas

Nota:

A propriedade streamWrapper::$context é atualizada se um contexto válido é passado no chamador da função.

Veja Também

  • unlink() - Apaga um arquivo
  • streamWrapper::rmdir() - Removes a directory