def local_delete_function_data(plugin_name): # Remove all stored data for a given module files = retrieve_all_names(plugin_name) if not files: return True for fname in files: fullpath = os.path.join(localstore_dir, plugin_name, fname) sys_utils.delete_file(fullpath) return True
def local_delete_data(plugin_name, data_name): # Given an oid and the name of a module, remove the data for that # combination if it exists. files = retrieve_all_names(plugin_name) if not files: return True for fname in files: fullpath = os.path.join(localstore_dir, plugin_name, fname) sys_utils.delete_file(fullpath) return True
def delete_module_data(mod_name): """ Remove all stored data for a given module """ files = retrieve_all_keys(mod_name) if not files: return True for fname in files: fullpath = os.path.join(datastore_dir, mod_name, fname) sys_utils.delete_file(fullpath) return True
def delete_oid_data(mod_name, oid): """ Given an oid and the name of a module, remove the data for that combination if it exists. """ files = retrieve_all_keys(mod_name) if not files: return True for fname in files: if fname.startswith(oid): fullpath = os.path.join(datastore_dir, mod_name, fname) sys_utils.delete_file(fullpath) return True