WordPress at Your Fingertips
function is not described

WP_Filesystem_Base::delete() public WP 2.5.0

Deletes a file or directory.

{} It's a method of the class: WP_Filesystem_Base{}

No Hooks.


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


$WP_Filesystem_Base = new WP_Filesystem_Base();
$WP_Filesystem_Base->delete( $file, $recursive, $type );
$file(string) (required)
Path to the file or directory.
If set to true, deletes files and folders recursively.
Default: false
Type of resource. 'f' for file, 'd' for directory.
Default: false


Since 2.5.0 Introduced.

Code of WP_Filesystem_Base::delete() WP 5.8.2

public function delete( $file, $recursive = false, $type = false ) {
	return false;