From: seebs@... (Peter Seebach) Date: 2007-06-04T22:27:18+09:00 Subject: Re: Deleting a file - is there a less clumsy way to do this? In message <387E9FC1619C0849BA8934938037E54F08800D@sv-muc-004.venyon-mail.local>, "Ronald Fisch er" writes: >if File.exist?(filename) > File.unlink(filename) >end >or, equivalently, >begin > File.unlink(filename) >rescue=20 > # ignore errors - it's OK if the file does not exist >end=20 These are not equivalent. There are other possible reasons for which an unlink attempt could fail! Consider what happens if two programs run through that first example at the same time. That said, I would love a non-exception-raising way to try an unlink. -s