def app_cleanup(app, request):
    r = True

    # Remove error files
    path = apath('%s/errors/' % app, request)
    if os.path.exists(path):
        for f in os.listdir(path):
            try:
                if f[:1] != '.': os.unlink(os.path.join(path, f))
            except IOError:
                r = False

    # Remove session files
    path = apath('%s/sessions/' % app, request)
    if os.path.exists(path):
        for f in os.listdir(path):
            try:
                if f[:1] != '.': recursive_unlink(os.path.join(path, f))
            except IOError:
                r = False

    # Remove cache files
    path = apath('%s/cache/' % app, request)
    if os.path.exists(path):
        for f in os.listdir(path):
            try:
                if f[:1] != '.': os.unlink(os.path.join(path, f))
            except IOError:
                r = False
    return r
Wrapper around os.makedirs that doesn't raise an exception if the
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/admin.py/app_cleanup--crossover with--dataset/ETHPy150Open c-w/Gutenberg/gutenberg/_util/os.py/makedirs