CodeExplorer fromLocation example
public function writeStream(string
$path,
$contents, Config
$config): void
{ $this->
write($path,
(string) stream_get_contents($contents),
$config);
} public function read(string
$path): string
{ $path =
$this->
preparePath($path);
if (!\
array_key_exists($path,
$this->files
)) { throw UnableToReadFile::
fromLocation($path, 'file does not exist'
);
} return $this->files
[$path]->
read();
} public function readStream(string
$path) { $path =
$this->
preparePath($path);
if (!\
array_key_exists($path,
$this->files
)) { throw UnableToReadFile::
fromLocation($path, 'file does not exist'
);
}