Hi there, I think we should check if it was successful and if not throw an exception. Or we could use FileUtils for this which does throw an exception if the delete fails:
http://commons.apache.org/io/api-release/org/apache/commons/io/FileUtils.html Bye, Norman 2011/9/7 Felix Knecht <fe...@otego.com>: > Hi > > In various places we use java.io.File.[delete|mkdir] without respecting the > return value. File.delete e.g. may just return false if the file/directory > can't be deleted/created because of any other reason than a > SecurityException [1]. > > Can this become a problem -> Jira or is it just a waste of thoughts? BTW in > Java 7 this can be solved by using java.nio.file.Files [2] which throws an > IOException in this case > > Regards > Felix > > [1] > http://download.oracle.com/javase/6/docs/api/java/io/File.html#delete%28%29 > [2] > http://download.oracle.com/javase/7/docs/api/java/nio/file/Files.html#delete%28java.nio.file.Path%29 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org > For additional commands, e-mail: server-dev-h...@james.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org