WP_Filesystem_FTPext::is_dir() – Checks if resource is a directory.

You appear to be a bot. Output may be restricted

Description

Checks if resource is a directory.

Usage

$bool = WP_Filesystem_FTPext::is_dir( $path );

Parameters

$path
( string ) required – Directory path.

Returns

bool Whether $path is a directory.

Source

File name: wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php
Lines:

1 to 11 of 11
  public function is_dir( $path ) {
    $cwd    = $this->WP_Filesystem_FTPext::cwd();
    $result = @ftp_chdir( $this->link, trailingslashit( $path ) );

    if ( $result && $path === $this->WP_Filesystem_FTPext::cwd() || $this->WP_Filesystem_FTPext::cwd() !== $cwd ) {
      @ftp_chdir( $this->link, $cwd );
      return true;
    }

    return false;
  }
 

 View on GitHub View on Trac