WP_Filesystem_FTPext::cwd()publicWP 2.5.0

Gets the current working directory.

Method of the class: WP_Filesystem_FTPext{}

No Hooks.

Return

String|false. The current working directory on success, false on failure.

Usage

$WP_Filesystem_FTPext = new WP_Filesystem_FTPext();
$WP_Filesystem_FTPext->cwd();

Changelog

Since 2.5.0 Introduced.

WP_Filesystem_FTPext::cwd() code WP 6.5.2

public function cwd() {
	$cwd = ftp_pwd( $this->link );

	if ( $cwd ) {
		$cwd = trailingslashit( $cwd );
	}

	return $cwd;
}