WP_Filesystem_Base::delete( string $file, bool $recursive = false, string|false $type = false )

Deletes a file or directory.

Parameters Parameters


(string) (Required) Path to the file or directory.


(bool) (Optional) If set to true, deletes files and folders recursively.

Default value: false


(string|false) (Optional) Type of resource. 'f' for file, 'd' for directory.

Default value: false

Top ↑

Return Return

(bool) True on success, false on failure.

Top ↑

Source Source

File: wp-admin/includes/class-wp-filesystem-base.php

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

Top ↑

Changelog Changelog

Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

Top ↑

You must log in before being able to contribute a note or feedback.