Re: Trash can



On Sat, Aug 11, 2001 at 11:03:18AM +0100, Manuel Arriaga wrote:
> I have written a shared library which, when preloaded, intercepts calls to
> GNU libc's unlink() function and makes sure that those files won't be
> deleted, but rather stored in a different directory.

Some initial thoughts:

For gmc and nautilus users, there's already a trash can.

Do all temporary files might end up in the trash can?
What if I run a gnome-terminal and from that compile the kernel, do
all the compiler tmp files (tens of thousands of them?) end up in
my thash can? :-)
Maybe an option to disable this if the files were in /tmp ?

A common (?) strategy for a tmp file is to open the file, then unlink it,
but keep it open and write to it -- this ensures the file goes away if
the program is interrupted.

Does your code work with non-GNU libc code?  E.g. on Solaris?

Lee

-- 
Liam Quin - Barefoot in Toronto - liam holoweb net - http://www.holoweb.net/
Ankh: irc.sorcery.net www.valinor.sorcery.net irc.gnome.org www.advogato.org
Author, Open Source XML Database Toolkit, Wiley August 2000
Co-author: The XML Specification Guide, Wiley 1999; Mastering XML, Sybex 2001




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