WP_Filesystem_ftpsockets::is_file( string $file ): bool

In this article

Checks if resource is a file.

Parameters

$filestringrequired
File path.

Return

bool Whether $file is a file.

Source

public function is_file( $file ) {
	if ( $this->is_dir( $file ) ) {
		return false;
	}

	if ( $this->exists( $file ) ) {
		return true;
	}

	return false;
}

Changelog

VersionDescription
2.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.