WP_Filesystem_Direct::get_contents_array() – Reads entire file into an array.

You appear to be a bot. Output may be restricted

Description

Reads entire file into an array.

Usage

$array|false = WP_Filesystem_Direct::get_contents_array( $file );

Parameters

$file
( string ) required – Path to the file.

Returns

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

Source

File name: wordpress/wp-admin/includes/class-wp-filesystem-direct.php
Lines:

1 to 3 of 3
  public function get_contents_array( $file ) {
    return @file( $file );
  }
 

 View on GitHub View on Trac