[tahoe-dev] How does file deletion work?

Rufus Pollock rufus.pollock at okfn.org
Mon Jul 13 09:29:31 PDT 2009


How does file deletion work?

webapi.txt says:

> DELETE /uri/$DIRCAP/[SUBDIRS../]CHILDNAME

[...]

> Note that this does not actually delete the file or directory that the name
> points to from the tahoe grid -- it only removes the named reference from
> this directory. If there are other names in this directory or in other
> directories that point to the resource, then it will remain accessible
> through those paths. Even if all names pointing to this object are removed
> from their parent directories, then someone with possession of its read-cap
> can continue to access the object through that cap.

Right: so deleting from a directory means unlinking from that
directory. If it is linked from elsewhere it won't be deleted and even
if i unlink from all directories if there's a read-cap out there it
will still stay so how do I *really* delete it for sure:

> The object will only become completely unreachable once 1: there are no
> reachable directories that reference it, and 2: nobody is holding a read-
> or write- cap to the object. (This behavior is very similar to the way
> hardlinks and anonymous files work in traditional unix filesystems).

But how do I (or tahoe) know if someone is holding a read or
write-cap? (And when we say someone we can't mean anything I've passed
the read-cap to, we've got to mean something that's connected to the
grid like another node right?)

Also how quickly once all read or write-caps have gone does deletion
happen (is this a GC thing?).

Thanks in advance for any help.

Rufus Pollock


More information about the tahoe-dev mailing list