from arch import * def mkdir(path): os.mkdir(path) add_id(path) def set_file_contents(path, contents): add = not os.path.exists(path) file(path, "wb").write(contents) if add: add_id(path) def unlink(path): os.unlink(path) delete_id(filename)