def _read_blocksize()

in azure/datalake/store/core.py [0:0]


    def _read_blocksize(self, offset=-1):
        """
        Reads next blocksize of data and updates the cache if read offset is not within cache otherwise nop

        Parameters
        ----------
        offset: int (-1)
            offset from where to read; if <0, last read location or beginning of file.

        Returns
        -------
        None
        """
        if offset < 0:
            offset = self.loc
        if offset >= self.size:
            self.start = self.size
            self.end = self.size
            self.cache = b""
            return
        if self.start <= offset < self.end:
            logger.debug("Read offset {offset} is within cache {start}-{end}. "
                        "Not going to server.".format(offset=offset, start=self.start, end=self.end))
            return
        if offset > self.size:
            raise ValueError('Read offset is outside the File')
        self._fetch(offset, offset + self.blocksize)