# Path: pyoracc/atf/common/atffile.py
# def check_atf(infile, atftype, verbose=False):
#     content = codecs.open(infile,
#                           encoding='utf-8-sig').read()
#     AtfFile(content, atftype, verbose)


import os
import click
from stat import ST_MODE, S_ISREG
from pyoracc.atf.common.atffile import check_atf



def check_and_process(pathname, atftype, verbose=False):
    mode = os.stat(pathname)[ST_MODE]
    if S_ISREG(mode) and pathname.lower().endswith('.atf'):
        # It's a file, call the callback function
        if verbose:
            click.echo('Info: Parsing {0}.'.format(pathname))

# Path: pyoracc/atf/common/atffile.py
# def check_atf(infile, atftype, verbose=False):
#     content = codecs.open(infile,
#                           encoding='utf-8-sig').read()
#     AtfFile(content, atftype, verbose)


# Path: pyoracc/wrapper/cli.py
import os
import click
from stat import ST_MODE, S_ISREG
from pyoracc.atf.common.atffile import check_atf




def check_and_process(pathname, atftype, verbose=False):
    mode = os.stat(pathname)[ST_MODE]
    if S_ISREG(mode) and pathname.lower().endswith('.atf'):
        # It's a file, call the callback function
        if verbose:
            click.echo('Info: Parsing {0}.'.format(pathname))

        check_atf(pathname, atftype, verbose)