<?php fclose(resource $stream): bool
<?php flock($handle, LOCK_UN); } } finally { fclose($handle); } }
<?php $response->setCallback(function () use ($path) { $stream = $this->readStream($path); fpassthru($stream); fclose($stream); }); return $response;
<?php ); if (is_resource($stream)) { fclose($stream); } return $result ? $path : false;
<?php $this->releaseLock(); } return fclose($this->handle); } }
<?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')); }
<?php $handle = fopen('php://memory', 'rw'); fwrite($handle, 'content'); $this->assertFalse($disk->writeStream('path.txt', $handle)); fclose($handle); unlink(__DIR__.'/../../my-custom-path/path.txt'); rmdir(__DIR__.'/../../my-custom-path');