WP_Filesystem_ftpsockets::rmdir() WordPress Method

The WP_Filesystem_ftpsockets::rmdir() method removes a directory on the FTP server. This is a wrapper for the ftp_rmdir() function. This function requires the host, username, and password parameters. The path parameter is the directory to remove. The recursive parameter is a Boolean value that indicates whether to delete all files and subdirectories in the specified directory. The default value is FALSE. The return value is TRUE on success or FALSE on failure.

WP_Filesystem_ftpsockets::rmdir( string $path, bool $recursive = false ) #

Deletes a directory.


Parameters

$path

(string)(Required)Path to directory.

$recursive

(bool)(Optional) Whether to recursively remove files/directories.

Default value: false


Top ↑

Return

(bool) True on success, false on failure.


Top ↑

Source

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

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


Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.