if (-d $file) {
# ensure there aren't any read only files.
system("chmod -R u+rw \"$file\"");
# store the directory in the trash storage.
if (-d $file) {
# ensure there aren't any read only files.
system("chmod -R u+rw \"$file\"");
# store the directory in the trash storage.