From: Brian Warner Date: Thu, 14 Dec 2006 03:37:00 +0000 (-0700) Subject: record some WIP structure for filetable X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~434 X-Git-Url: https://git.rkrishnan.org/webapi.txt?a=commitdiff_plain;h=bc4e7aad70eadbf44e29b6b917f70cf15933600e;p=tahoe-lafs%2Ftahoe-lafs.git record some WIP structure for filetable --- diff --git a/allmydata/filetable.py b/allmydata/filetable.py index bb96b02a..b52c367d 100644 --- a/allmydata/filetable.py +++ b/allmydata/filetable.py @@ -107,3 +107,32 @@ class GlobalVirtualDrive(service.MultiService): def get_root(self): return self._root + +class Node: + pass + +class MutableFileNode(Node): + """I hold an SSK identifier for a mutable file. My 'contents' are + defined to be the most recent version of the SSK's payload that can + be found. This SSK identifier must be dereferenced to get the + contents.""" + pass +class ImmutableFileNode(Node): + """I hold a CHK identifier for an immutable file. I may have some + metadata as well: ctime, mtime, content-type, and filesize.""" + pass +class ImmutableDirectoryNode(Node): + """I hold a list of child nodes.""" + pass +class MutableDirectoryNode2(Node): + """I hold an SSK identifier for a mutable directory. When + dereferenced, I will have a list of child nodes.""" + pass + +# interesting feature ideas: +# pubsub for MutableDirectoryNode: get rapid notification of changes +# caused by someone else +# +# bind a local physical directory to the MutableDirectoryNode contents: +# each time the vdrive changes, update the local drive to match, and +# vice versa.