WP_Filesystem_SSH2::is_file() WordPress Method
The WP_Filesystem_SSH2::is_file() function is used to check whether a given file exists on the server. This function is useful for checking whether a given file is a valid WordPress file.
WP_Filesystem_SSH2::is_file( string $file ) #
Checks if resource is a file.
Parameters
- $file
(string)(Required)File path.
Return
(bool) Whether $file is a file.
Source
File: wp-admin/includes/class-wp-filesystem-ssh2.php
public function is_file( $file ) { return is_file( $this->sftp_path( $file ) ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |