Re: Trash Can and Sun



In article <48400854$0$16916$ec3e2dad@xxxxxxxxxxxxxxxxxxxxxx>,
"Kenneth P. Turvey" <kt-usenet@xxxxxxxxxxxxxxxxxx> wrote:

On Fri, 30 May 2008 14:22:21 +0100, Tom Anderson wrote:

Maybe. If the semantics of Desktop.moveToTrash(File) are that it moves
something to the trash, then is a permanent delete a good fallback? If i
let a user put things in the trash, but actually delete them, then later
he finds out his files are gone forever, am i not guilty of misleading
him?

An exception might be best I suppose.

Actually maybe not. 99.9% of the time the exception will be handled by
deleting the file.

If the system does not normally use a trash system, then the user will
expect files they delete to go away right away, so that is the right
behavior. Thus, there is no need for an exception.

It would probably make the most sense for this to be part of File,
though: File.deleteForUser(). This would mean that the delete decision
was made by a user, not the program, and so *if* the system normally
uses some mechanism to protect the user against accidents, it should be
used now.

--
--Tim Smith
.



Relevant Pages

  • Re: Office crashing + wont reinstall
    ... Since you dragged Office to the trash, you also dragged all the updates to ... the setup assistant from the disc gives me this report for apple: ... Exception Codes: KERN_INVALID_ADDRESS at 0x000000009d2b3a4d ...
    (microsoft.public.mac.office.word)
  • Re: Trash Can and Sun
    ... then is a permanent delete a good fallback? ... let a user put things in the trash, but actually delete them, then later ... An exception might be best I suppose. ...
    (comp.lang.java.programmer)
  • Re: Trash Can and Sun
    ... let a user put things in the trash, but actually delete them, then later ... An exception might be best I suppose. ... I wish that Java had a method for specifying default exception handlers ... And I'm not completely sure about the universe. ...
    (comp.lang.java.programmer)
  • Southside Johnny Question
    ... with the exception of Trash It UP and I know he agrees with that). ... Not sure if it was his personality or if ... singer ever put on wax. ...
    (rec.music.artists.springsteen)
  • Re: Trash Can and Sun
    ... Kenneth P. Turvey wrote: ... then is a permanent delete a good fallback? ... let a user put things in the trash, but actually delete them, then later ...
    (comp.lang.java.programmer)