def prune_resource_files()

in evalbench/util/sessionmgr.py [0:0]


    def prune_resource_files(self, session_id):
        path = os.path.join(SESSION_RESOURCES_PATH, session_id)
        if not os.path.exists(path):
            return
        for root, dirs, files in os.walk(path, topdown=False):
            for file in files:
                file_path = os.path.join(root, file)
                os.remove(file_path)
            for dir in dirs:
                dir_path = os.path.join(root, dir)
                os.rmdir(dir_path)
        os.rmdir(path)