Streamer

class OC\Streamer
Source:lib/private/Streamer.php#41

Properties

Methods

public OC\Streamer::__construct($request, $size, $numberOfFiles)
Streamer constructor.
Source:

lib/private/Streamer.php#56

Parameters:
  • $request (OCP\IRequest)
  • $size (int) The size of the files in bytes
  • $numberOfFiles (int) The number of files (and directories) that will

be included in the streamed file

public OC\Streamer::sendHeaders($name)
Send HTTP headers
Source:

lib/private/Streamer.php#97

Parameters:
  • $name (string)
public OC\Streamer::addDirRecursive($dir, $internalDir="")
Stream directory recursively
Source:lib/private/Streamer.php#110
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\InvalidPathException
public OC\Streamer::addFileFromStream($stream, $internalName, $size, $time)
Add a file to the archive at the specified location and file name.
Source:

lib/private/Streamer.php#156

Parameters:
  • $stream (string) Stream to read data from
  • $internalName (string) Filepath and name to be used in the archive.
  • $size (int) Filesize
  • $time (int | bool) File mtime as int, or false
Returns:

bool $success

public OC\Streamer::addEmptyDir($dirName)
Add an empty directory entry to the archive.
Source:

lib/private/Streamer.php#177

Parameters:
  • $dirName (string) Directory Path and name to be added to the archive.
Returns:

bool $success

public OC\Streamer::finalize()
Close the archive.
A closed archive can no longer have new files added to it. After
closing, the file is completely written to the output stream.
Source:lib/private/Streamer.php#187
Returns:bool $success