mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-18 23:38:18 +00:00
client.create_mutable_file(contents=) now accepts a callable, which is
invoked with the new MutableFileNode and is supposed to return the initial contents. This can be used by e.g. a new dirnode which needs the filenode's writekey to encrypt its initial children. create_mutable_file() still accepts a bytestring too, or None for an empty file.
This commit is contained in:
@ -463,7 +463,7 @@ class Client(node.Node, pollmixin.PollMixin):
|
||||
d.addCallback(lambda n: n.set_children(initial_children))
|
||||
return d
|
||||
|
||||
def create_mutable_file(self, contents="", keysize=None):
|
||||
def create_mutable_file(self, contents=None, keysize=None):
|
||||
return self.nodemaker.create_mutable_file(contents, keysize)
|
||||
|
||||
def upload(self, uploadable):
|
||||
|
Reference in New Issue
Block a user