Instead, the following happens:
\TRASH
.
(You can see it by typing DIR /A \
on the command line.)
D:\MYFILES\ARTICLES
, the directory D:\TRASH\MYFILES\ARTICLES
is created. This allows the trash can to remember where the object was deleted from.
The reason for this is simple: speed. If we were physically moving objects into the
trash can folder, this would frequently move files across drives. (Just think about
moving a 30 MB file into the trash can this way.) By contrast, since the
\TRASH
directory is always on the same drive as the object, even moving
large folder trees should take place very fast.
So when an object is moved to the trash can, it is actually duplicated: the "real"
object is moved to the invisible \TRASH
directory tree, and a "trash object"
(XFldTrashObject, WPTransient subclass) is created in the trash can.
\TRASH
directories, and trash objects are created according to the
objects which reside in the subdirectories in there.
\TRASH
directories is moved back to where it was
deleted from (or to the location where the user is moving it to), and the trash object
in the trash can is destroyed, since it serves no longer any purpose.
\TRASH
directories are destroyed, and all trash objects
in the trash can are destroyed also.
Besides, using a subclass of WPTransient has another advantage. Since the
trash objects (the transient objects) are recreated from scratch after every WPS
restart, if something goes wrong really bad, you can manually delete all the hidden
\TRASH
directories on all drives, and after the next Desktop startup, the
trash can is completely empty.