Automattic\WooCommerce\Internal\Admin\Logging\FileV2
File::get_stream
Open a read-only stream for this file.
Method of the class: File{}
No Hooks.
Returns
resource|false
.
Usage
$File = new File(); $File->get_stream();
File::get_stream() File::get stream code WC 9.9.5
public function get_stream() { if ( ! $this->is_readable() ) { return false; } if ( ! is_resource( $this->stream ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fopen -- No suitable alternative. $this->stream = fopen( $this->path, 'rb' ); } return $this->stream; }