protected function LargeFileContent::doWrite in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/LargeFileContent.php \org\bovigo\vfs\content\LargeFileContent::doWrite()
actual writing of data with specified length at given offset
Parameters
string $data:
int $offset:
int $length:
Overrides SeekableFileContent::doWrite
File
- vendor/
mikey179/ vfsStream/ src/ main/ php/ org/ bovigo/ vfs/ content/ LargeFileContent.php, line 134
Class
- LargeFileContent
- File content implementation to mock large files.
Namespace
org\bovigo\vfs\contentCode
protected function doWrite($data, $offset, $length) {
for ($i = 0; $i < $length; $i++) {
$this->content[$i + $offset] = $data[$i];
}
if ($offset >= $this->size) {
$this->size += $length;
}
elseif ($offset + $length > $this->size) {
$this->size = $offset + $length;
}
}