WP_Filesystem_FTPext::exists( string $file )
Parameters
- $file
-
(Required)
Return
(bool)
Source
File: wp-admin/includes/class-wp-filesystem-ftpext.php
public function exists($file) {
$list = @ftp_nlist($this->link, $file);
if ( empty( $list ) && $this->is_dir( $file ) ) {
return true; // File is an empty directory.
}
return !empty($list); //empty list = no file, so invert.
}