def _dirstats(dpath=None):  
from ubelt import util_colors<EOL>if dpath is None:<EOL><INDENT>dpath = os.getcwd()<EOL><DEDENT>print('<STR_LIT>')<EOL>print('<STR_LIT>'.format(dpath))<EOL>print('<STR_LIT>')<EOL>print('<STR_LIT>')<EOL>if not os.path.exists(dpath):<EOL><INDENT>print('<STR_LIT>')<EOL>return<EOL><DEDENT>paths = sorted(os.listdir(dpath))<EOL>for path in paths:<EOL><INDENT>full_path = join(dpath, path)<EOL>E = os.path.exists(full_path)<EOL>L = os.path.islink(full_path)<EOL>F = os.path.isfile(full_path)<EOL>D = os.path.isdir(full_path)<EOL>J = util_platform.WIN32 and _win32_links._win32_is_junction(full_path)<EOL>ELFDJ = [E, L, F, D, J]<EOL>if   ELFDJ == [<NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:1>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:1>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:1>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>elif ELFDJ == [<NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>]:<EOL><INDENT>path = util_colors.color_text(path, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>'.format(dpath))<EOL>print('<STR_LIT>'.format(path))<EOL>raise AssertionError(str(ELFDJ) + str(path))<EOL><DEDENT>line = '<STR_LIT>'.format(**locals())<EOL>if os.path.islink(full_path):<EOL><INDENT>line += '<STR_LIT>' + os.readlink(full_path)<EOL><DEDENT>elif _win32_links is not None:<EOL><INDENT>if _win32_links._win32_is_junction(full_path):<EOL><INDENT>line += '<STR_LIT>' + _win32_links._win32_read_junction(full_path)<EOL><DEDENT><DEDENT>print(line)<EOL><DEDENT>
Testing helper for printing directory information
(mostly for investigating windows weirdness)

CommandLine:
    python -m ubelt.util_links _dirstats