File$stream

File$stream(callback) → void

Read the file in a streaming manner. As the file is consumed, the callback function will repeatedly be called with the next chunk of bytes.

Parameters:

callback : function(chunk) A function that will be called as the file contents are streamed. chunk is a raw vector containing the latest bytes received from the server, and will usually be 16k or less.

Returns:

void

Examples

f = redivis.file("rnwk-acs3famee.pVr4Gzq54L3S9pblMZTs5Q")

# Stream a file
data <- f$stream(function(x) {
  print(length(x))
})

Last updated