def get_file_size(path):
assert isinstance(path, (str, _oldstr))<EOL>if not os.path.isfile(path):<EOL><INDENT>raise IOError('<STR_LIT>', path)<EOL><DEDENT>return os.path.getsize(path)<EOL>
The the size of a file in bytes.

    Parameters
    ----------
    path: str
        The path of the file.

    Returns
    -------
    int
        The size of the file in bytes.

    Raises
    ------
    IOError
        If the file does not exist.
    OSError
        If a file system error occurs.