예제 #1
0
	def __init__(self):
		# initialize meta data markup language
		self.mdml = MDML()

		# initialize root directory
		root = self.mdml.getRoot()
		stat = Stat()
		stat.setDefaultContext(os.getuid(), os.getgid())
		stat.setDirectory()
		for key, value in stat.getStringItems():
			root.set(key, value)
예제 #2
0
	def make_file(self, path, name):
		# make new node
		new_node = self.mdml.addNode(path, name)
		if new_node == None:
			return None

		# initialize file
		stat = Stat().setDefaultContext().setFile()
		for key, value in stat.getStringItems():
			new_node.set(key, value)
		return new_node