# Path: apasvo/utils/futils.py
# def istextfile(filename, blocksize=512):
# def is_little_endian():
# def read_in_chunks(file_object, chunk_size=1024):
# def read_txt_in_chunks(file_object, n=1024, comments='#'):
# def getSize(f):
# def get_delimiter(fileobject, lines=16):
# def get_sample_rate(filename, max_header_lines=64, comments='#'):
# def copytree(src, dst, symlinks=False, ignore=None):


import numpy as np
from apasvo.utils import futils
                Possible values are: 'little-endian', 'big-endian' and 'native'.
                Default value is 'native'.
        """
        super(TextFile, self).__init__()
        self.dtype = np.dtype(self._byteorders[byteorder] + self._datatypes[dtype])
        self.filename = filename

    def read(self, **kwargs):
        """Constructs a numpy array from the data stored in the file.

        Data-type and byte-order of the returned array are the object's same.

        The following arguments are taken from the documentation
        of the numpy function 'loadtxt'.
        Args:
            dtype: Data-type of the resulting array.
            comments: String indicating the start of a comment.
                Default: '#'.
            delimiter: String used to separate values.
                Default: ' '.
        """
        return np.loadtxt(self.filename, dtype=self.dtype, **kwargs)

    def read_in_blocks(self, block_size=1024):
        """Lazy function (generator) that reads a text file in chunks.

        Default chunk size is 1k characters.
        Data-type and byte-order of the returned data are the object's same.
        """
        with open(self.filename, 'r') as f:

# Path: apasvo/utils/futils.py
# def istextfile(filename, blocksize=512):
# def is_little_endian():
# def read_in_chunks(file_object, chunk_size=1024):
# def read_txt_in_chunks(file_object, n=1024, comments='#'):
# def getSize(f):
# def get_delimiter(fileobject, lines=16):
# def get_sample_rate(filename, max_header_lines=64, comments='#'):
# def copytree(src, dst, symlinks=False, ignore=None):


# Path: apasvo/utils/formats/rawfile.py
import numpy as np
from apasvo.utils import futils

                Possible values are: 'little-endian', 'big-endian' and 'native'.
                Default value is 'native'.
        """
        super(TextFile, self).__init__()
        self.dtype = np.dtype(self._byteorders[byteorder] + self._datatypes[dtype])
        self.filename = filename

    def read(self, **kwargs):
        """Constructs a numpy array from the data stored in the file.

        Data-type and byte-order of the returned array are the object's same.

        The following arguments are taken from the documentation
        of the numpy function 'loadtxt'.
        Args:
            dtype: Data-type of the resulting array.
            comments: String indicating the start of a comment.
                Default: '#'.
            delimiter: String used to separate values.
                Default: ' '.
        """
        return np.loadtxt(self.filename, dtype=self.dtype, **kwargs)

    def read_in_blocks(self, block_size=1024):
        """Lazy function (generator) that reads a text file in chunks.

        Default chunk size is 1k characters.
        Data-type and byte-order of the returned data are the object's same.
        """
        with open(self.filename, 'r') as f:

            for data in futils.read_txt_in_chunks(f, block_size):