src/Viserio/Component/Filesystem/FilesystemAdapter.php
public function append(string $path, string $contents, array $config = []): bool
    {
        if ($this->has($path)) {
            $contents = $this->read($path) . $contents;

            if (! $this->driver->delete($path)) {
                throw new IOException(\sprintf('File [%s] cannot be deleted.', $path));
            }
        }

        return $this->write($path, $contents, $config);
    }
public function append(string $path, string $contents, array $config = []): bool
    {
        if ($this->has($path)) {
            $contents = $this->read($path) . $contents;

            if (! $this->driver->delete($path)) {
                throw new IOException(\sprintf('File [%s] cannot be deleted.', $path));
            }
        }

        return $this->write($path, $contents, $config);
    }
{@inheritdoc}

@throws \Viserio\Component\Contract\Filesystem\Exception\IOException If file cant be deleted