Skip to content

Commit

Permalink
Update Encryption.php
Browse files Browse the repository at this point in the history
  • Loading branch information
martink-p committed Jun 13, 2019
1 parent 5cc7d49 commit 0229157
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/private/Files/Stream/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,13 @@ public function stream_read($count) {
}

/**
* stream_read wrapper to read complete requested block
* Name: stream_read_block
* Description: This function is a wrapper for function stream_read.
* It calls stream read until the requested $blockSize was received or no remaining data is present.
* This is required as stream_read only returns smaller chunks of data when the stream fetches from a remote storage over the internet
* and it does not care about the given $blockSize.
* Inputs: int $blockSize. Length of requested data block in bytes
* Returns: string. data fetched from stream.
*/
private function stream_read_block(int $blockSize): string {
$remaining = $blockSize;
Expand Down

0 comments on commit 0229157

Please sign in to comment.