KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jftp > net > SmbConnection


1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15  */

16 package net.sf.jftp.net;
17
18 import java.io.BufferedInputStream JavaDoc;
19 import java.io.BufferedOutputStream JavaDoc;
20 import java.io.File JavaDoc;
21 import java.io.FileInputStream JavaDoc;
22 import java.io.FileOutputStream JavaDoc;
23 import java.io.IOException JavaDoc;
24 import java.io.InputStream JavaDoc;
25 import java.io.StreamTokenizer JavaDoc;
26 import java.util.Date JavaDoc;
27 import java.util.Vector JavaDoc;
28
29 import jcifs.smb.NtlmAuthenticator;
30 import jcifs.smb.NtlmPasswordAuthentication;
31 import jcifs.smb.SmbAuthException;
32 import jcifs.smb.SmbFile;
33 import jcifs.smb.SmbFileOutputStream;
34 import net.sf.jftp.config.Settings;
35 import net.sf.jftp.system.StringUtils;
36 import net.sf.jftp.system.logging.Log;
37
38
39 public class SmbConnection extends NtlmAuthenticator implements BasicConnection
40 {
41     public static int smbBuffer = 128000;
42     private String JavaDoc path = "";
43     private String JavaDoc pwd = "smb://";
44     private Vector JavaDoc listeners = new Vector JavaDoc();
45     private String JavaDoc[] files;
46     private String JavaDoc[] size = new String JavaDoc[0];
47     private int[] perms = null;
48     private String JavaDoc user;
49     private String JavaDoc pass;
50     private String JavaDoc host;
51     private String JavaDoc domain = null;
52     private String JavaDoc baseFile;
53     private int fileCount;
54     private boolean isDirUpload = false;
55     private boolean shortProgress = false;
56     private boolean dummy = false;
57
58     public SmbConnection()
59     {
60     }
61
62     public SmbConnection(String JavaDoc url, String JavaDoc domain, String JavaDoc user, String JavaDoc pass,
63                          ConnectionListener l)
64     {
65         if(l != null)
66         {
67             listeners.add(l);
68         }
69
70         this.user = user;
71         this.pass = pass;
72         //TODO set hostname from smb url
73
//this.host = host;
74

75         //***
76
if(domain.equals("NONE"))
77         {
78             domain = null;
79         }
80
81         this.domain = domain;
82
83         //if(url == null) chdir(getPWD());
84
if(url.equals("(LAN)"))
85         {
86             chdir(getPWD());
87         }
88         else
89         {
90             chdir(url);
91         }
92
93         //***
94
}
95
96     protected NtlmPasswordAuthentication getNtlmPasswordAuthentication()
97     {
98         //Log.debug("Auth: " + domain+ ";" + user + ":" + pass);
99
try
100         {
101             return new NtlmPasswordAuthentication(domain, user, pass);
102         }
103         catch(Exception JavaDoc ex)
104         {
105             Log.debug("Error logging in: " + ex);
106             ex.printStackTrace();
107
108             return null;
109         }
110     }
111
112     private NtlmPasswordAuthentication getAuth()
113     {
114         return getNtlmPasswordAuthentication();
115     }
116
117     public int removeFileOrDir(String JavaDoc file)
118     {
119         file = toSMB(file);
120
121         //System.out.println(file);
122
try
123         {
124             SmbFile f = new SmbFile(file, getAuth());
125
126             if(f.exists() && f.isDirectory())
127             {
128                 cleanSmbDir(file);
129             }
130
131             f.delete();
132         }
133         catch(Exception JavaDoc ex)
134         {
135             Log.debug("Removal failed (" + ex + ").");
136
137             return -1;
138         }
139
140         return 1;
141     }
142
143     private void cleanSmbDir(String JavaDoc dir) throws Exception JavaDoc
144     {
145         dir = toSMB(dir);
146
147         SmbFile f2 = new SmbFile(dir, getAuth());
148         String JavaDoc[] tmp = f2.list();
149
150         if(tmp == null)
151         {
152             return;
153         }
154
155         for(int i = 0; i < tmp.length; i++)
156         {
157             SmbFile f3 = new SmbFile(dir + tmp[i], getAuth());
158
159             if(f3.isDirectory())
160             {
161                 //System.out.println(dir);
162
cleanSmbDir(dir + tmp[i]);
163                 f3.delete();
164             }
165             else
166             {
167                 //System.out.println(dir+tmp[i]);
168
f3.delete();
169             }
170         }
171     }
172
173     public void sendRawCommand(String JavaDoc cmd)
174     {
175     }
176
177     public void disconnect()
178     {
179     }
180
181     public boolean isConnected()
182     {
183         return true;
184     }
185
186     public String JavaDoc getPWD()
187     {
188         //Log.debug("PWD: " + pwd);
189
return toSMB(pwd);
190     }
191
192     public boolean cdup()
193     {
194         String JavaDoc tmp = pwd;
195
196         if(pwd.endsWith("/") && !pwd.equals("smb://"))
197         {
198             tmp = pwd.substring(0, pwd.lastIndexOf("/"));
199         }
200
201         return chdir(tmp.substring(0, tmp.lastIndexOf("/") + 1));
202     }
203
204     public boolean mkdir(String JavaDoc dirName)
205     {
206         try
207         {
208             if(!dirName.endsWith("/"))
209             {
210                 dirName = dirName + "/";
211             }
212
213             dirName = toSMB(dirName);
214
215             SmbFile f = new SmbFile(dirName, getAuth());
216             f.mkdir();
217
218             fireDirectoryUpdate();
219
220             return true;
221         }
222         catch(Exception JavaDoc ex)
223         {
224             Log.debug("Failed to create directory (" + ex + ").");
225
226             return false;
227         }
228     }
229
230     public void list() throws IOException JavaDoc
231     {
232     }
233
234     public boolean chdir(String JavaDoc p)
235     {
236         return chdir(p, true);
237     }
238
239     public boolean chdir(String JavaDoc p, boolean refresh)
240     {
241         try
242         {
243             if(p.endsWith(".."))
244             {
245                 return cdup();
246             }
247
248             String JavaDoc tmp = toSMB(p);
249
250             if(!tmp.endsWith("/"))
251             {
252                 tmp = tmp + "/";
253             }
254
255             //Log.debug("tmp: " + tmp);
256
SmbFile f = new SmbFile(tmp, getAuth());
257             f.list();
258
259             pwd = tmp;
260
261             //Log.debug("pwd: " + pwd);
262
//System.out.println("chdir: " + getPWD());
263
if(refresh)
264             {
265                 fireDirectoryUpdate();
266             }
267
268             //System.out.println("chdir2: " + getPWD());
269
dummy = false;
270
271             return true;
272         }
273         catch(Exception JavaDoc ex)
274         {
275             if((ex.getMessage().indexOf("MSBROWSE") > 0) && !dummy)
276             {
277                 Log.debug("\nCould not find a master server.");
278                 Log.debug("Please make sure you have the local IP set to the interface you want to use, and if");
279                 Log.debug("that does not work try \"<default>\"...");
280                 Log.debug("If you still can not find a master make sure that there is one your LAN and submit a bug report.");
281                 dummy = true;
282             }
283             else
284             {
285                 Log.debug("Could not change directory (" + ex + ").");
286             }
287
288             return false;
289         }
290     }
291
292     public boolean chdirNoRefresh(String JavaDoc p)
293     {
294         return chdir(p, false);
295     }
296
297     public String JavaDoc getLocalPath()
298     {
299         return path;
300     }
301
302     public boolean setLocalPath(String JavaDoc p)
303     {
304         if(StringUtils.isRelative(p))
305         {
306             p = path + p;
307         }
308
309         p = p.replace('\\', '/');
310
311         //System.out.println(", local 2:" + p);
312
File JavaDoc f = new File JavaDoc(p);
313
314         if(f.exists())
315         {
316             try
317             {
318                 path = f.getCanonicalPath();
319                 path = path.replace('\\', '/');
320
321                 if(!path.endsWith("/"))
322                 {
323                     path = path + "/";
324                 }
325
326                 //System.out.println("localPath: "+path);
327
}
328             catch(IOException JavaDoc ex)
329             {
330                 Log.debug("Error: can not get pathname (local)!");
331
332                 return false;
333             }
334         }
335         else
336         {
337             Log.debug("(local) No such path: \"" + p + "\"");
338
339             return false;
340         }
341
342         return true;
343     }
344
345     public String JavaDoc[] sortLs()
346     {
347         try
348         {
349             //Log.debug("sortLs: trying");
350
chdirNoRefresh(getPWD());
351
352             SmbFile fx = new SmbFile(pwd, getAuth());
353
354             //System.out.println(pwd);
355
//if(fx == null) System.out.println("Smb: fx null");
356
SmbFile[] f = fx.listFiles();
357
358             //Log.debug("sortLs: file is there and listed");
359
//if(f == null) System.out.println("Smb: f null");
360
files = new String JavaDoc[f.length];
361             size = new String JavaDoc[f.length];
362             perms = new int[f.length];
363
364             int i;
365
366             for(i = 0; i < f.length; i++)
367             {
368                 files[i] = f[i].toURL().toString();
369
370                 int x = 0;
371
372                 for(int j = 0; j < files[i].length(); j++)
373                 {
374                     if(files[i].charAt(j) == '/')
375                     {
376                         x++;
377                     }
378                 }
379
380                 if(files[i].endsWith("/") && (x > 3))
381                 {
382                     files[i] = StringUtils.getDir(files[i]);
383                 }
384                 else if(x > 3)
385                 {
386                     files[i] = StringUtils.getFile(files[i]);
387                 }
388
389                 size[i] = "" + f[i].length();
390
391                 if(f[i].canRead())
392                 {
393                     perms[i] = FtpConnection.R;
394                 }
395                 else if(f[i].canWrite())
396                 {
397                     perms[i] = FtpConnection.R;
398                 }
399                 else
400                 {
401                     perms[i] = FtpConnection.DENIED;
402                 }
403             }
404
405             //Log.debug("sortLs: finished, ok");
406
return files;
407         }
408         catch(Exception JavaDoc ex)
409         {
410             if(ex instanceof SmbAuthException)
411             {
412                 Log.debug("Access denied: " + ex);
413
414                 //Log.debug("URL: " + getPWD());
415
//Log.debug("Auth (bin): " + getAuth().toString());
416
//Log.debug("Auth: " + domain+ ";" + user + ":" + pass);
417
}
418             else
419             {
420                 Log.debug("Error: " + ex);
421             }
422
423             return new String JavaDoc[0];
424         }
425     }
426
427     public String JavaDoc[] sortSize()
428     {
429         return size;
430     }
431
432     public int[] getPermissions()
433     {
434         return perms;
435     }
436
437     public int handleUpload(String JavaDoc f)
438     {
439         if(Settings.getEnableSmbMultiThreading())
440         {
441             SmbTransfer t = new SmbTransfer(getPWD(), getLocalPath(), f, user,
442                                             pass, domain, listeners,
443                                             Transfer.UPLOAD);
444         }
445         else
446         {
447             upload(f);
448         }
449
450         return 0;
451     }
452
453     public int handleDownload(String JavaDoc f)
454     {
455         if(Settings.getEnableSmbMultiThreading())
456         {
457             SmbTransfer t = new SmbTransfer(getPWD(), getLocalPath(), f, user,
458                                             pass, domain, listeners,
459                                             Transfer.DOWNLOAD);
460         }
461         else
462         {
463             download(f);
464         }
465
466         return 0;
467     }
468
469     public int upload(String JavaDoc f)
470     {
471         String JavaDoc file = toSMB(f);
472
473         if(file.endsWith("/"))
474         {
475             String JavaDoc out = StringUtils.getDir(file);
476             uploadDir(file, getLocalPath() + out);
477             fireActionFinished(this);
478         }
479         else
480         {
481             String JavaDoc outfile = StringUtils.getFile(file);
482
483             //System.out.println("transfer: " + file + ", " + getLocalPath() + outfile);
484
work(getLocalPath() + outfile, file);
485             fireActionFinished(this);
486         }
487
488         return 0;
489     }
490
491     public int download(String JavaDoc f)
492     {
493         String JavaDoc file = toSMB(f);
494
495         if(file.endsWith("/"))
496         {
497             String JavaDoc out = StringUtils.getDir(file);
498             downloadDir(file, getLocalPath() + out);
499             fireActionFinished(this);
500         }
501         else
502         {
503             String JavaDoc outfile = StringUtils.getFile(file);
504
505             //System.out.println("transfer: " + file + ", " + getLocalPath() + outfile);
506
work(file, getLocalPath() + outfile);
507             fireActionFinished(this);
508         }
509
510         return 0;
511     }
512
513     private void downloadDir(String JavaDoc dir, String JavaDoc out)
514     {
515         try
516         {
517             //System.out.println("downloadDir: " + dir + "," + out);
518
fileCount = 0;
519             shortProgress = true;
520             baseFile = StringUtils.getDir(dir);
521
522             SmbFile f2 = new SmbFile(dir, getAuth());
523             String JavaDoc[] tmp = f2.list();
524
525             if(tmp == null)
526             {
527                 return;
528             }
529
530             File JavaDoc fx = new File JavaDoc(out);
531             fx.mkdir();
532
533             for(int i = 0; i < tmp.length; i++)
534             {
535                 tmp[i] = tmp[i].replace('\\', '/');
536
537                 //System.out.println("1: " + dir+tmp[i] + ", " + out +tmp[i]);
538
SmbFile f3 = new SmbFile(dir + tmp[i], getAuth());
539
540                 if(f3.isDirectory())
541                 {
542                     if(!tmp[i].endsWith("/"))
543                     {
544                         tmp[i] = tmp[i] + "/";
545                     }
546
547                     downloadDir(dir + tmp[i], out + tmp[i]);
548                 }
549                 else
550                 {
551                     fileCount++;
552                     fireProgressUpdate(baseFile,
553                                        DataConnection.GETDIR + ":" + fileCount,
554                                        -1);
555                     work(dir + tmp[i], out + tmp[i]);
556                 }
557             }
558
559             fireProgressUpdate(baseFile,
560                                DataConnection.DFINISHED + ":" + fileCount, -1);
561         }
562         catch(Exception JavaDoc ex)
563         {
564             ex.printStackTrace();
565
566             //System.out.println(dir + ", " + out);
567
Log.debug("Transfer error: " + ex);
568             fireProgressUpdate(baseFile,
569                                DataConnection.FAILED + ":" + fileCount, -1);
570         }
571
572         shortProgress = false;
573     }
574
575     private void uploadDir(String JavaDoc dir, String JavaDoc out)
576     {
577         try
578         {
579             //System.out.println("uploadDir: " + dir + "," + out);
580
isDirUpload = true;
581             fileCount = 0;
582             shortProgress = true;
583             baseFile = StringUtils.getDir(dir);
584
585             File JavaDoc f2 = new File JavaDoc(out);
586             String JavaDoc[] tmp = f2.list();
587
588             if(tmp == null)
589             {
590                 return;
591             }
592
593             SmbFile fx = new SmbFile(dir, getAuth());
594             fx.mkdir();
595
596             for(int i = 0; i < tmp.length; i++)
597             {
598                 tmp[i] = tmp[i].replace('\\', '/');
599
600                 //System.out.println("1: " + dir+tmp[i] + ", " + out +tmp[i]);
601
File JavaDoc f3 = new File JavaDoc(out + tmp[i]);
602
603                 if(f3.isDirectory())
604                 {
605                     if(!tmp[i].endsWith("/"))
606                     {
607                         tmp[i] = tmp[i] + "/";
608                     }
609
610                     uploadDir(dir + tmp[i], out + tmp[i]);
611                 }
612                 else
613                 {
614                     fileCount++;
615                     fireProgressUpdate(baseFile,
616                                        DataConnection.PUTDIR + ":" + fileCount,
617                                        -1);
618                     work(out + tmp[i], dir + tmp[i]);
619                 }
620             }
621
622             fireProgressUpdate(baseFile,
623                                DataConnection.DFINISHED + ":" + fileCount, -1);
624         }
625         catch(Exception JavaDoc ex)
626         {
627             ex.printStackTrace();
628
629             //System.out.println(dir + ", " + out);
630
Log.debug("Transfer error: " + ex);
631             fireProgressUpdate(baseFile,
632                                DataConnection.FAILED + ":" + fileCount, -1);
633         }
634
635         isDirUpload = false;
636         shortProgress = true;
637     }
638
639     private String JavaDoc toSMB(String JavaDoc f)
640     {
641         String JavaDoc file;
642
643         if(f.lastIndexOf("smb://") > 0)
644         {
645             f = f.substring(f.lastIndexOf("smb://"));
646         }
647
648         if(f.startsWith("smb://"))
649         {
650             file = f;
651         }
652         else
653         {
654             file = getPWD() + f;
655         }
656
657         file = file.replace('\\', '/');
658
659         //System.out.println("file: "+file);
660
return file;
661     }
662
663     private void work(String JavaDoc file, String JavaDoc outfile)
664     {
665         BufferedOutputStream JavaDoc out = null;
666         BufferedInputStream JavaDoc in = null;
667
668         try
669         {
670             boolean outflag = false;
671
672             if(outfile.startsWith("smb://"))
673             {
674                 outflag = true;
675                 out = new BufferedOutputStream JavaDoc(new SmbFileOutputStream(new SmbFile(outfile,
676                                                                                    getAuth())));
677             }
678             else
679             {
680                 out = new BufferedOutputStream JavaDoc(new FileOutputStream JavaDoc(outfile));
681             }
682
683             //System.out.println("out: " + outfile + ", in: " + file);
684
if(file.startsWith("smb://"))
685             {
686                 in = new BufferedInputStream JavaDoc(new SmbFile(file, getAuth()).getInputStream());
687             }
688             else
689             {
690                 in = new BufferedInputStream JavaDoc(new FileInputStream JavaDoc(file));
691             }
692
693             byte[] buf = new byte[smbBuffer];
694             int len = 0;
695             int reallen = 0;
696
697             //System.out.println(file+":"+getLocalPath()+outfile);
698
while(true)
699             {
700                 len = in.read(buf);
701
702                 //System.out.print(".");
703
if(len == StreamTokenizer.TT_EOF)
704                 {
705                     break;
706                 }
707
708                 out.write(buf, 0, len);
709                 reallen += len;
710
711                 //System.out.println(file + ":" + StringUtils.getFile(file));
712
if(outflag)
713                 {
714                     fireProgressUpdate(StringUtils.getFile(outfile),
715                                        DataConnection.PUT, reallen);
716                 }
717                 else
718                 {
719                     fireProgressUpdate(StringUtils.getFile(file),
720                                        DataConnection.GET, reallen);
721                 }
722             }
723
724             fireProgressUpdate(file, DataConnection.FINISHED, -1);
725         }
726         catch(IOException JavaDoc ex)
727         {
728             Log.debug("Error with file IO (" + ex + ")!");
729             fireProgressUpdate(file, DataConnection.FAILED, -1);
730         }
731         finally
732         {
733             try
734             {
735                 out.flush();
736                 out.close();
737                 in.close();
738             }
739             catch(Exception JavaDoc ex)
740             {
741                 ex.printStackTrace();
742             }
743         }
744     }
745
746     private void update(String JavaDoc file, String JavaDoc type, int bytes)
747     {
748         if(listeners == null)
749         {
750             return;
751         }
752         else
753         {
754             for(int i = 0; i < listeners.size(); i++)
755             {
756                 ConnectionListener listener = (ConnectionListener) listeners.elementAt(i);
757                 listener.updateProgress(file, type, bytes);
758             }
759         }
760     }
761
762     public void addConnectionListener(ConnectionListener l)
763     {
764         listeners.add(l);
765     }
766
767     public void setConnectionListeners(Vector JavaDoc l)
768     {
769         listeners = l;
770     }
771
772     /** remote directory has changed */
773     public void fireDirectoryUpdate()
774     {
775         if(listeners == null)
776         {
777             return;
778         }
779         else
780         {
781             for(int i = 0; i < listeners.size(); i++)
782             {
783                 ((ConnectionListener) listeners.elementAt(i)).updateRemoteDirectory(this);
784             }
785         }
786     }
787
788     public boolean login(String JavaDoc user, String JavaDoc pass)
789     {
790         return true;
791     }
792
793     /** progress update */
794     public void fireProgressUpdate(String JavaDoc file, String JavaDoc type, int bytes)
795     {
796         //System.out.println(listener);
797
if(listeners == null)
798         {
799             return;
800         }
801         else
802         {
803             for(int i = 0; i < listeners.size(); i++)
804             {
805                 ConnectionListener listener = (ConnectionListener) listeners.elementAt(i);
806
807                 if(shortProgress && Settings.shortProgress)
808                 {
809                     if(type.startsWith(DataConnection.DFINISHED))
810                     {
811                         listener.updateProgress(baseFile,
812                                                 DataConnection.DFINISHED + ":" +
813                                                 fileCount, bytes);
814                     }
815                     else if(isDirUpload)
816                     {
817                         listener.updateProgress(baseFile,
818                                                 DataConnection.PUTDIR + ":" +
819                                                 fileCount, bytes);
820                     }
821                     else
822                     {
823                         listener.updateProgress(baseFile,
824                                                 DataConnection.GETDIR + ":" +
825                                                 fileCount, bytes);
826                     }
827                 }
828                 else
829                 {
830                     listener.updateProgress(file, type, bytes);
831                 }
832             }
833         }
834     }
835
836     public void fireActionFinished(SmbConnection con)
837     {
838         if(listeners == null)
839         {
840             return;
841         }
842         else
843         {
844             for(int i = 0; i < listeners.size(); i++)
845             {
846                 ((ConnectionListener) listeners.elementAt(i)).actionFinished(con);
847             }
848         }
849     }
850
851     public int upload(String JavaDoc file, InputStream JavaDoc i)
852     {
853         BufferedOutputStream JavaDoc out = null;
854         BufferedInputStream JavaDoc in = null;
855
856         try
857         {
858             file = toSMB(file);
859
860             out = new BufferedOutputStream JavaDoc(new SmbFileOutputStream(new SmbFile(file,
861                                                                                getAuth())));
862             in = new BufferedInputStream JavaDoc(i);
863
864             byte[] buf = new byte[smbBuffer];
865             int len = 0;
866             int reallen = 0;
867
868             while(true)
869             {
870                 len = in.read(buf);
871
872                 if(len == StreamTokenizer.TT_EOF)
873                 {
874                     break;
875                 }
876
877                 out.write(buf, 0, len);
878                 reallen += len;
879
880                 fireProgressUpdate(StringUtils.getFile(file),
881                                    DataConnection.PUT, reallen);
882             }
883
884             fireProgressUpdate(file, DataConnection.FINISHED, -1);
885
886             return 0;
887         }
888         catch(IOException JavaDoc ex)
889         {
890             ex.printStackTrace();
891             Log.debug("Error with file IO (" + ex + ")!");
892             fireProgressUpdate(file, DataConnection.FAILED, -1);
893         }
894         finally
895         {
896             try
897             {
898                 out.flush();
899                 out.close();
900                 in.close();
901             }
902             catch(Exception JavaDoc ex)
903             {
904                 ex.printStackTrace();
905             }
906         }
907
908         return -1;
909     }
910
911     public InputStream JavaDoc getDownloadInputStream(String JavaDoc file)
912     {
913         file = toSMB(file);
914
915         try
916         {
917             return new BufferedInputStream JavaDoc(new SmbFile(file, getAuth()).getInputStream());
918         }
919         catch(Exception JavaDoc ex)
920         {
921             ex.printStackTrace();
922             Log.debug(ex.toString() +
923                       " @SmbConnection::getDownloadInputStream");
924
925             return null;
926         }
927     }
928
929     public Date JavaDoc[] sortDates()
930     {
931         return null;
932     }
933
934     public boolean rename(String JavaDoc file, String JavaDoc to)
935     {
936         try
937         {
938             file = toSMB(file);
939             to = toSMB(to);
940
941             SmbFile src = new SmbFile(file, getAuth());
942
943             src.renameTo(new SmbFile(to, getAuth()));
944
945             return true;
946         }
947         catch(Exception JavaDoc ex)
948         {
949             ex.printStackTrace();
950             Log.debug(ex.toString() + " @SmbConnection::rename");
951
952             return false;
953         }
954     }
955 }
956
Popular Tags