#1058 closed defect (invalid)

DELETE /uri/$DIRCAP/[SUBDIRS../]CHILDNAME to free space

Reported by: wangleziji Owned by:
Priority: major Milestone: undecided
Component: code-frontend-web Version: 1.5.0
Keywords: delete file Cc:
Launchpad Bug:

Description (last modified by markberger)

after upload a file in a directory,then I try to delete the file,but the response.status is 200,but the space is not freed. the code:

conn = httplib.HTTPConnection('192.168.0.27:3456') conn.request('DELETE','/uri/'+cap+name) response = conn.getresponse()

http://tahoe-lafs.org/source/tahoe/trunk/docs/frontends/webapi.txt describe:

This removes the given name from its parent directory. CHILDNAME is the name to be removed, and $DIRCAP/SUBDIRS.. indicates the directory that will be modified. 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.

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). This operation will not modify more than a single directory. Intermediate directories which were implicitly created by PUT or POST methods will *not* be automatically removed by DELETE. This method returns the file- or directory- cap of the object that was just removed.

but I want to know how to delete the file completely and free the disk space after upload!!

Change History (1)

comment:1 Changed at 2013-07-30T15:51:03Z by markberger

  • Description modified (diff)
  • Resolution set to invalid
  • Status changed from new to closed

The file will garbage collected once those two criteria are met, and this will free the disk space. By design, Tahoe doesn't allow users to permanently delete a file.

Note: See TracTickets for help on using tickets.