WP_Filesystem_FTPext::cwd() WordPress Method
The cwd() method is a method of the WP_Filesystem_FTPext class and is used to change the current working directory on the FTP server. This is useful for making sure that you are always working in the correct directory when working with files on the server.
WP_Filesystem_FTPext::cwd() #
Gets the current working directory.
Return
(string|false) The current working directory on success, false on failure.
Source
File: wp-admin/includes/class-wp-filesystem-ftpext.php
public function cwd() { $cwd = ftp_pwd( $this->link ); if ( $cwd ) { $cwd = trailingslashit( $cwd ); } return $cwd; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |