WordPress\AiClientDependencies\Psr\Http\Message

StreamFactoryInterface::createStreamFromFilepublicWP 1.0

Create a stream from an existing file.

The file MUST be opened using the given mode, which may be any mode supported by the fopen function.

The $filename MAY be any string supported by fopen().

Method of the class: StreamFactoryInterface{}

No Hooks.

Returns

StreamInterface.

Usage

$StreamFactoryInterface = new StreamFactoryInterface();
$StreamFactoryInterface->createStreamFromFile( $filename, $mode ): StreamInterface;
$filename(string) (required)
Filename or stream URI to use as basis of stream.
$mode(string)
Mode with which to open the underlying filename/stream.
Default: 'r'

StreamFactoryInterface::createStreamFromFile() code WP 7.0

public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface;