[cap-talk] [e-lang] File API taming

Zooko O'Whielacronx zookog at gmail.com
Thu Mar 19 23:25:07 EDT 2009

adding Cc: cap-talk; If anyone reads cap-talk and not e-lang, here is
the root of this thread:


Tahoe implements a file API rather like Ihad Awab's original proposal:
the first-class file and directory objects don't know what they are
called, and they can be called different different things by different

In the context of a distributed system with no trusted server, there
hardly seems to be any alternative.

Tahoe also allows users to keep a list of names, possibly joined
together with separating "/", and deference them in turn from some
starting directory.  It hardly seems possible to prevent that, either.

Here's the api:


Various people have used this API successfully but not without
problems.  One good example problem is here:


Nathan Wilcox wrote a JavaScript library to use this API, and wrote
HTML docs for this library, and embedded relative hyperlinks relative
to the current directory in those HTML files pointing to sibling HTML
files, and was surprised (just before publicly announcing his project)
that you can't follow those hyperlinks.  I've had similar problems
with my JavaScript-on-Tahoe project which resulted in my blog:


The JavaScript library that I was using -- TiddlyWiki -- wants to
write itself back to its original location, which is easy, but in
addition it would like to write to the current directory into a file
named the same as the original location with the extension changed
from .html to .xml, to generate the RSS feed:


In addition it would like to save backup copies of itself to the
current working directory under a name like "$FNAME.old-1",
"$FNAME.old-2", etc.

After a few minutes of thinking about this I changed it from having a
reference to its own original source file, to having a tuple of 1. a
reference to a directory, and 2. the name of its original source
within that directory.  Then the RSS feed started working.  (Please
subscribe to my RSS feed.  :-))

Another data point from real implementation is this intriguing note
about the "Ten15" system:




More information about the cap-talk mailing list