Example #1
0
	def add(self, full_path, node):
		path, name = shetpath.split(full_path)
		
		assert name, Exception("Must specify a file.")
		
		directory = self.get_dir(path)
		assert name not in directory, Exception(
			"Path %s already exists." % full_path)
		directory[name] = node
		self.on_change("add", full_path)
Example #2
0
	def remove(self, path):
		head, tail = shetpath.split(path)
		
		del self.get_node(head)[tail]
		self.on_change("remove", path)