PHP Function Reference

PHP streamWrapper rmdir() Method



The PHP streamWrapper::rmdir() method removes a directory. This method is called in response to rmdir() 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 directories.

Syntax

public streamWrapper::rmdir(path, options)

Parameters

path Required. Specify the directory URL to be removed.
options Required. Specify a bitwise mask of values, such as STREAM_MKDIR_RECURSIVE.

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