WP_Filesystem_Direct::rmdir()publicWP 2.5.0

Deletes a directory.

Method of the class: WP_Filesystem_Direct{}

No Hooks.

Return

true|false. True on success, false on failure.

Usage

$WP_Filesystem_Direct = new WP_Filesystem_Direct();
$WP_Filesystem_Direct->rmdir( $path, $recursive );
$path(string) (required)
Path to directory.
$recursive(true|false)
Whether to recursively remove files/directories.
Default: false

Changelog

Since 2.5.0 Introduced.

WP_Filesystem_Direct::rmdir() code WP 6.6.2

public function rmdir( $path, $recursive = false ) {
	return $this->delete( $path, $recursive );
}