WP_Filesystem_Direct::exists
Checks if a file or directory exists.
Method of the class: WP_Filesystem_Direct{}
No Hooks.
Returns
true|false. Whether $path exists or not.
Usage
$WP_Filesystem_Direct = new WP_Filesystem_Direct(); $WP_Filesystem_Direct->exists( $path );
- $path(string) (required)
- Path to file or directory.
Changelog
| Since 2.5.0 | Introduced. |
WP_Filesystem_Direct::exists() WP Filesystem Direct::exists code WP 7.0
public function exists( $path ) {
return @file_exists( $path );
}