WP_Filesystem_Direct::get_contents_array( string $file ): array|false

In this article

Reads entire file into an array.

Parameters

$filestringrequired
Path to the file.

Return

array|false File contents in an array on success, false on failure.

Source

public function get_contents_array( $file ) {
	return @file( $file );
}

Changelog

VersionDescription
2.5.0Introduced.

User Contributed Notes

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