On this page
WP_Filesystem_ftpsockets::is_dir( string $path ): bool
Checks if resource is a directory.
Parameters
$pathstring Required-
Directory path.
Return
bool Whether $path is a directory.
Source
File: wp-admin/includes/class-wp-filesystem-ftpsockets.php. View all references
public function is_dir( $path ) {
$cwd = $this->cwd();
if ( $this->chdir( $path ) ) {
$this->chdir( $cwd );
return true;
}
return false;
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Filesystem_ftpsockets::cwd() wp-admin/includes/class-wp-filesystem-ftpsockets.php | Gets the current working directory. |
| WP_Filesystem_ftpsockets::chdir() wp-admin/includes/class-wp-filesystem-ftpsockets.php | Changes current directory. |
Used By
| Used By | Description |
|---|---|
| WP_Filesystem_ftpsockets::exists() wp-admin/includes/class-wp-filesystem-ftpsockets.php | Checks if a file or directory exists. |
| WP_Filesystem_ftpsockets::is_file() wp-admin/includes/class-wp-filesystem-ftpsockets.php | Checks if resource is a file. |
| WP_Filesystem_ftpsockets::chmod() wp-admin/includes/class-wp-filesystem-ftpsockets.php | Changes filesystem permissions. |
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_filesystem_ftpsockets/is_dir