wppaste
WordPress

WP_Filesystem_Base

Since
2.5.0
Source
wp-admin/includes/class-wp-filesystem-base.php:14
Base WordPress Filesystem class which Filesystem implementations extend.

Compatibility

WordPress
since 2.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 5

$verboseboolpublic
Whether to display debug data for the connection.
$cachearraypublic
Cached list of local filepaths to mapped remote filepaths.
$methodstringpublic
The Access method of the current connection, Set automatically.
$errorsWP_Errorpublic
$optionspublic

Methods · 39

Source code

#[AllowDynamicProperties]class WP_Filesystem_Base { 	/**	 * Whether to display debug data for the connection.	 *	 * @since 2.5.0	 * @var bool	 */	public $verbose = false; 	/**	 * Cached list of local filepaths to mapped remote filepaths.	 *	 * @since 2.7.0	 * @var array	 */	public $cache = array(); 	/**	 * The Access method of the current connection, Set automatically.	 *	 * @since 2.5.0	 * @var string	 */	public $method = ''; 	/**	 * @var WP_Error	 */	public $errors = null; 	/**	 */	public $options = array(); 	/**	 * Returns the path on the remote filesystem of ABSPATH.	 *	 * @since 2.7.0	 *	 * @return string The location of the remote path.	 */	public function abspath() {		$folder = $this->find_folder( ABSPATH ); 		/*		 * Perhaps the FTP folder is rooted at the WordPress install.		 * Check for wp-includes folder in root. Could have some false positives, but rare.		 */		if ( ! $folder && $this->is_dir( '/' . WPINC ) ) {			$folder = '/';		} 		return $folder;	} 	/**	 * Returns the path on the remote filesystem of WP_CONTENT_DIR.	 *	 * @since 2.7.0	 *	 * @return string The location of the remote path.	 */	public function wp_content_dir() {		return $this->find_folder( WP_CONTENT_DIR );	} 	/**	 * Returns the path on the remote filesystem of WP_PLUGIN_DIR.	 *	 * @since 2.7.0	 *	 * @return string The location of the remote path.	 */	public function wp_plugins_dir() {		return $this->find_folder( WP_PLUGIN_DIR );	} 	/**

Changelog

Introduced in 2.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-admin/includes/class-wp-filesystem-base.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.