WP_Filesystem_Direct::is_file() WordPress Method
The WP_Filesystem_Direct::is_file() method is used to check if a given file exists and is a regular file. This is a wrapper for the PHP is_file() function.
WP_Filesystem_Direct::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-direct.php
public function is_file( $file ) { return @is_file( $file ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |