IWriteStreamStorage

interface OCP\Files\Storage\IWriteStreamStorage
Interface that adds the ability to write a stream directly to file
Implemented by:OC\Files\Storage\Wrapper\Wrapper OC\Files\Storage\Common
Source:lib/public/Files/Storage/IWriteStreamStorage.php#37
Parent:OCP\Files\Storage\IStorage

Methods

public OCP\Files\Storage\IWriteStreamStorage::writeStream($path, $stream, $size=null)
Write the data from a stream to a file
Source:

lib/public/Files/Storage/IWriteStreamStorage.php#48

Parameters:
  • $path (string)
  • $stream (resource)
  • $size (int | null) the size of the stream if known in advance
Returns:

int the number of bytes written

Throws:

\OCP\Files\GenericFileException

Since:

15.0.0