$path = $this->normalizePath($path);
switch ($mode) {
+ case 'a':
+ case 'ab':
+ case 'a+':
+ return false;
case 'r':
case 'rb':
try {
}
case 'w':
case 'wb':
- case 'a':
- case 'ab':
case 'r+':
case 'w+':
case 'wb+':
- case 'a+':
case 'x':
case 'x+':
case 'c':
}
$source = $this->fopen($path, 'r');
file_put_contents($tmpFile, $source);
- // Seek to end if required
- if ($mode[0] === 'a') {
- fseek($tmpFile, 0, SEEK_END);
- }
}
$handle = fopen($tmpFile, $mode);
return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {