assert isinstance(name, unicode)
if self.is_readonly():
return defer.fail(NotMutableError())
- d = self._nodemaker.create_new_mutable_directory()
- if initial_children:
- d.addCallback(lambda n: n.set_children(initial_children))
+ d = self._nodemaker.create_new_mutable_directory(initial_children)
def _created(child):
entries = [(name, child, None)]
a = Adder(self, entries, overwrite=overwrite)
return d
def create_new_mutable_directory(self, initial_children={}):
- if initial_children:
- raise NotImplementedError("initial_children= not implemented yet")
d = self.create_mutable_file()
d.addCallback(self._create_dirnode)
+ if initial_children:
+ d.addCallback(lambda n: n.set_children(initial_children))
return d