Re: SmbFile.delete() method return type
"Vella, Shon" <[email protected]> Fri, 27 Feb 2015 08:26:40 -0700
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <CAND51tRuxuLn5u-3_qeHg8DVC0-FOQ1KfFaBPQaGkuDKwM--2A@mail.gmail.com> |
--001a11c3447ec56c2d0510137e74 Content-Type: text/plain; charset=UTF-8 If it fails it will throw an exception, which you should catch and handle. *-Shon* On Fri, Feb 27, 2015 at 7:57 AM, M. D. <[email protected]> wrote: > 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 > --001a11c3447ec56c2d0510137e74 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">If it fails it will throw an exception, which you should c= atch and handle.<div class=3D"gmail_extra"><br clear=3D"all"><div><div clas= s=3D"gmail_signature"><div dir=3D"ltr"><div style=3D"font-size:15px;padding= -left:5px"><font color=3D"#000000"><b>-Shon</b></font></div></div></div></d= iv> <br><div class=3D"gmail_quote">On Fri, Feb 27, 2015 at 7:57 AM, M. D. <span= dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">moder@ab= v.bg</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=C2=A0Hello,<b= r> <br> I have a question for the community.<br> <br> Since SmbFile.delete() returns void instead of boolean as is java.io.File, = is it safe to assume that successfully returning from SmbFile.delete() woul= d indicate that the file was actually deleted? Would there be any need do a= dditional checks for existance with SmbFile.exists() afterwards?<br> <br> Best regards,<br> M.D<br> </blockquote></div><br></div></div> --001a11c3447ec56c2d0510137e74--