mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-23 01:08:53 +00:00
clean up uri-vs-cap terminology, emphasize cap instances instead of URI strings
* "cap" means a python instance which encapsulates a filecap/dircap (uri.py) * "uri" means a string with a "URI:" prefix * FileNode instances are created with (and retain) a cap instance, and generate uri strings on demand * .get_cap/get_readcap/get_verifycap/get_repaircap return cap instances * .get_uri/get_readonly_uri return uri strings * add filenode.download_to_filename() for control.py, should find a better way * use MutableFileNode.init_from_cap, not .init_from_uri * directory URI instances: use get_filenode_cap, not get_filenode_uri * update/cleanup bench_dirnode.py to match, add Makefile target to run it
This commit is contained in:
@ -271,12 +271,15 @@ class DirectoryNode:
|
||||
def get_readonly_uri(self):
|
||||
return self._uri.get_readonly().to_string()
|
||||
|
||||
def get_cap(self):
|
||||
return self._uri
|
||||
def get_readcap(self):
|
||||
return self._uri.get_readonly()
|
||||
def get_verify_cap(self):
|
||||
return self._uri.get_verify_cap()
|
||||
|
||||
def get_repair_cap(self):
|
||||
if self._node.is_readonly():
|
||||
return None
|
||||
return None # readonly (mutable) dirnodes are not yet repairable
|
||||
return self._uri
|
||||
|
||||
def get_storage_index(self):
|
||||
|
Reference in New Issue
Block a user