Automattic\WooCommerce\Internal\Admin\Logging\FileV2
File::get_stream
Open a read-only stream for this file.
Метод класса: File{}
Хуков нет.
Возвращает
resource|false.
Использование
$File = new File(); $File->get_stream();
Код File::get_stream() File::get stream WC 10.5.2
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;
}