include "files.alh"
include "primitives.alh"
include "modelling.alh"
include "object_operations.alh"

Boolean function main(model : Element):
	Element files
	String file

	files = allInstances(model, "Files/File")
	while (set_len(files) > 0):
		file = set_pop(files)
		write_file(string_replace(read_attribute(model, file, "name"), "/", "_"), read_attribute(model, file, "content"))

	return True!
