[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ading a wastebasket



On Wed, Sep 23, 1998 at 01:31:48PM +0200, Michael Meskes wrote:

> So I wonder whether these is a package taking care of this. Otherwise I
> might consider writing one. My idea would be to create a library that
> overloads the unlink() call. I wonder if others would be interested in
> this too.

I'm glad someone else had this idea :)

I think it will work.  More generally, we should have a system that
redirects URL's and converts files from one type to another as necessary.  I
have some sample code (last tested with libc5, unfortunately) at:

	http://www.worldvisions.ca/~apenwarr/freestyle/
	
You might want to take a look.  The most annoying thing about overriding
libc calls is that it's very libc-specific :( 

Ah, if only I had time to pursue that particular project.

unlink() is a good start, though.  If you do decide to go through with that,
it would be nice if it could (for example) notice a "disk full" error on
write and auto-flush the trash can directory to make room.  Then as long as
you always have your library LD_PRELOADed, any program you have that needs
more disk space will be able to get it.

There are lots of possible problems you could run into, though, so watch
out.

Good luck,

Avery


Reply to: