fclose
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Closes an open file pointer
fclose
(
resource $stream
):
bool
flock
(
$handle
,
LOCK_UN
);
}
} finally {
fclose
(
$handle
);
}
}
src/Illuminate/Filesystem/Filesystem.php
$response
->
setCallback
(function () use (
$path
) {
$stream
=
$this
->
readStream
(
$path
);
fpassthru
(
$stream
);
fclose
(
$stream
);
});
return
$response
;
src/Illuminate/Filesystem/FilesystemAdapter.php
);
if (
is_resource
(
$stream
)) {
fclose
(
$stream
);
}
return
$result
?
$path
:
false
;
src/Illuminate/Filesystem/FilesystemAdapter.php
$this
->
releaseLock
();
}
return
fclose
(
$this
->
handle
);
}
}
src/Illuminate/Filesystem/LockableFile.php
$stream
=
fopen
(
$this
->
tempDir
.
'/foo.txt'
,
'r'
);
$guzzleStream
= new
Stream
(
$stream
);
$filesystemAdapter
->
put
(
'bar.txt'
,
$guzzleStream
);
fclose
(
$stream
);
$this
->
assertSame
(
'some-data'
,
$filesystemAdapter
->
get
(
'bar.txt'
));
}
tests/Filesystem/FilesystemAdapterTest.php