[rucksack-devel] (mapc #'delete-file <whole-rucksack-directory>)

Arthur Lemmens alemmens at xs4all.nl
Mon Mar 31 19:00:19 UTC 2008


Volkan YAZICI wrote:

> In rucksack.lisp:517 it writes that:
>
>   (:supersede
>    ;; Remove all rucksack files from the directory.
>    ;; DO: Only delete the files that Rucksack actually
>    ;; uses.
>    (mapc #'delete-file
>          (directory (make-pathname :name :wild
>   				 :type :wild
>   				 :version :wild
>   				 :defaults directory)))
>    (apply #'make-instance class :directory directory args))
>
> I tried some but couldn't figure out how to list files that Rucsack
> actually uses.

I just added a function RUCKSACK-FILES-IN-DIRECTORY which gives a
list with the files that Rucksack uses.  At the moment that's only
4 files: "heap", "roots", "objects" and "schemas".

> And, IMHO, above snippet is quite buggy.

Yes, I agree.  That's why I had the 'to do' note there.

> (It costed me removing all files under the data directory I
> specified for Rucksack.)

Ouch.  Sorry about that...

I hadn't expected that people would put other files in the Rucksack
directory.  But I suppose that only shows my lack of imagination.

> I'd be appreciated if anybody can fix it.

I just rewrote this to delete only the files that are actually used
and nothing else.  The fix is in the CVS repository now.

Thanks for the bug report,

Arthur




More information about the rucksack-devel mailing list