示例#1
0
 public static void DeleteFileList()
 {
     foreach (string str in _fnamelist)
     {
         try
         {
             RecycleBin.DeleteFile(str);
         }
         catch
         {
         }
     }
     _fnamelist.Clear();
 }
 public static void DeleteDirectory()
 {
     foreach (string str in _dirslist)
     {
         try
         {
             if (Directory.Exists(str))
             {
                 RecycleBin.DeleteDir(str);
             }
         }
         catch
         {
         }
     }
     _dirslist.Clear();
 }
示例#3
0
 public static void DeleteFile(string fpath)
 {
     RecycleBin.DeleteFile(fpath);
     _fnamelist.Remove(fpath);
 }