/**
* Checks if resource is a directory.
*
* @since 2.5.0
*
* @param string $path Directory path.
* @return bool Whether $path is a directory.
*/
public function is_dir( $path ) { $cwd =
$this->
cwd();
if ( $this->
chdir( $path ) ) { $this->
chdir( $cwd );
return true;
} return false;
} /**
* Checks if a file is readable.
*
* @since 2.5.0
*
* @param string $file Path to file.
* @return bool Whether $file is readable.
*/