mirror of
https://github.com/nextcloud/server.git
synced 2024-12-29 16:38:28 +00:00
f28e74b7a8
Signed-off-by: provokateurin <kate@provokateurin.de>
30 lines
699 B
PHP
30 lines
699 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
namespace OCP\Files\Storage;
|
|
|
|
use OCP\Files\GenericFileException;
|
|
|
|
/**
|
|
* Interface that adds the ability to write a stream directly to file
|
|
*
|
|
* @since 15.0.0
|
|
*/
|
|
interface IWriteStreamStorage extends IStorage {
|
|
/**
|
|
* Write the data from a stream to a file
|
|
*
|
|
* @param resource $stream
|
|
* @param ?int $size the size of the stream if known in advance
|
|
* @return int the number of bytes written
|
|
* @throws GenericFileException
|
|
* @since 15.0.0
|
|
*/
|
|
public function writeStream(string $path, $stream, ?int $size = null): int;
|
|
}
|