Pergunta de entrevista da empresa A9.com

Assume that the read file function does not exist but instead we have a function that given an input size in bytes with a maximum byte constraint and moves the cursor. If the number of bytes exceeds the file size, contents up to the end are returned and if the cursor is at the end of the file an empty string is returned. Write a new file read function using the helper function. Also, asked for the complexity of the function.