def rm(path, isdir=False):
    """delete file or dir
    returns True if deleted, if file/dir not exists, return False

    :param path: path to delete
    :param isdir: set True if you want to delete dir
    """
    if isdir:
        deleted = os.path.isdir(path)
        shutil.rmtree(path, ignore_errors=True)
    elif os.path.isfile(path) or os.path.islink(path):
        deleted = True
        os.remove(path)
    else:
        deleted = False
    return deleted