Exemple #1
0
 private static void RecRm(FTPClient ftp, string name)
 {
     ftp.ChDir(name);
     string[] list;
     if ((list = ftp.Dir(null, true)).Length > 0)
     {
         foreach (string thing in list)
         {
             string thingname = thing.Substring(56);
             if (thing.Substring(0,1) == "d")
                 RecRm(ftp, thingname);
             else
                 ftp.Delete(thingname);
         }
     }
     ftp.ChDir("..");
     ftp.RmDir(name);
 }