Skip to main content

read

Function read 

Source
pub fn read(handle: &DocumentHandle) -> Result<Vec<u8>, Error>
Expand description

The whole of a stored file.

The size is asked for first, the buffer is allocated once at exactly that size, and every range is written by the host straight into its place in it. A file this action has no memory for is refused before anything is read, and a range answered short — a file that changed while it was read — is refused rather than handed over incomplete.