PHP streamWrapper mkdir() Method
The PHP streamWrapper::mkdir() method creates a directory. This method is called in response to mkdir() function.
Note: In order for the appropriate error message to be returned this method should not be defined if the wrapper does not support creating directories.
Syntax
public streamWrapper::mkdir(path, mode, options)
Parameters
path |
Required. Specify the directory URL to be created. |
mode |
Required. Specify the mode (permission) passed to mkdir(), given as an octal value (starting with 0). The parameter consists of four numbers:
|
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