Discussion:
[jcifs] SmbFile.delete() method return type
M. D.
2015-02-27 14:57:10 UTC
Permalink
Hello,

I have a question for the community.

Since SmbFile.delete() returns void instead of boolean as is java.io.File, is it safe to assume that successfully returning from SmbFile.delete() would indicate that the file was actually deleted? Would there be any need do additional checks for existance with SmbFile.exists() afterwards?

Best regards,
M.D
Vella, Shon
2015-02-27 15:26:40 UTC
Permalink
If it fails it will throw an exception, which you should catch and handle.

*-Shon*
Post by M. D.
Hello,
I have a question for the community.
Since SmbFile.delete() returns void instead of boolean as is java.io.File,
is it safe to assume that successfully returning from SmbFile.delete()
would indicate that the file was actually deleted? Would there be any need
do additional checks for existance with SmbFile.exists() afterwards?
Best regards,
M.D
Loading...