fread
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Binary-safe file read
fread
(
resource $stream
,
int $length
):
string
|
false
if (
flock
(
$handle
,
LOCK_SH
)) {
clearstatcache
(
true
,
$path
);
$contents
=
fread
(
$handle
,
$this
->
size
(
$path
) ?:
1
);
flock
(
$handle
,
LOCK_UN
);
}
src/Illuminate/Filesystem/Filesystem.php
{
clearstatcache
(
true
,
$this
->
path
);
return
fread
(
$this
->
handle
,
$length
?? (
$this
->
size
() ?:
1
));
}
src/Illuminate/Filesystem/LockableFile.php