Beispiel #1
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
Beispiel #2
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)
Beispiel #3
0
	def stat(self, node):
		stat = Stat()
		stat.setStringItems(node)
		return stat