def get_path_completion_type(cwords, cword, opts):
if cword < <NUM_LIT:2> or not cwords[cword - <NUM_LIT:2>].startswith('<STR_LIT:->'):<EOL><INDENT>return<EOL><DEDENT>for opt in opts:<EOL><INDENT>if opt.help == optparse.SUPPRESS_HELP:<EOL><INDENT>continue<EOL><DEDENT>for o in str(opt).split('<STR_LIT:/>'):<EOL><INDENT>if cwords[cword - <NUM_LIT:2>].split('<STR_LIT:=>')[<NUM_LIT:0>] == o:<EOL><INDENT>if not opt.metavar or any(<EOL>x in ('<STR_LIT:path>', '<STR_LIT:file>', '<STR_LIT>')<EOL>for x in opt.metavar.split('<STR_LIT:/>')):<EOL><INDENT>return opt.metavar<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Get the type of path completion (``file``, ``dir``, ``path`` or None)

    :param cwords: same as the environmental variable ``COMP_WORDS``
    :param cword: same as the environmental variable ``COMP_CWORD``
    :param opts: The available options to check
    :return: path completion type (``file``, ``dir``, ``path`` or None)