How Undelete works


Back  Back to main page

Here's the technical low-down if you're interested.

A program called Reclamator runs in the background.  This program watches all entries that appear in the Trash.  An item appears in the Trash when you press "delete" or "ctrl-T" to move it to the Trash.

When an item appears in the Trash, Reclamator tags this item with the following attributes:

Original Name
This is the name the item had before it was moved to the Trash.  If an item is moved to the Trash but an item already exists with the same name, BeOS renames the new item to "xxx copy" or "xxx copy 2" etc.  Remembering the original name lets Undelete restore the item to its original name.
When Deleted
This lets you know when you moved each item to the Trash.
Deleted From
This is the folder the item was removed from, so Undelete knows where to restore the item to.

When you run the Undelete add-on on an item in the Trash, Undelete reads the Deleted From and Original Name attributes so it knows where to restore the item to.  If Reclamator wasn't running while the item was moved to the Trash, these attributes won't be present and Undelete won't know where to restore the item to.

If you open a folder that is in the Trash, the items in the folder do not have the extra attributes that Reclamator adds to items in the Trash.  This is because Reclamator would have to add thousands of attributes to thousands of files if you removed a folder which contained thousands of entries.  You can still undelete items from sub-folders in the Trash however, because Undelete walks up the folder hierarchy until it gets to the top folder in the Trash, from whose attributes it knows where to restore the items to.

 

Copyright © Magnus Hellman 2000