Example #1
0
        public static int Delete(List <string> path)
        {
            var pm = new Shfileopstruct {
                wFunc = FO_DELETE, pFrom = path[0]
            };

            for (var i = 1; i < path.Count; i++)
            {
                pm.pFrom += '\0' + path[i];
            }
            pm.pFrom += '\0';
            pm.pTo    = null;
            pm.fFlags = FOF_ALLOWUNDO | FOF_WANTNUKEWARNING;
            return(SHFileOperation(pm));
        }
Example #2
0
 public static int Delete(List<string> path)
 {
     var pm = new Shfileopstruct {wFunc = FO_DELETE, pFrom = path[0]};
     for (var i = 1; i < path.Count; i++)
     {
         pm.pFrom += '\0' + path[i];
     }
     pm.pFrom += '\0';
     pm.pTo = null;
     pm.fFlags = FOF_ALLOWUNDO | FOF_WANTNUKEWARNING;
     return SHFileOperation(pm);
 }
Example #3
0
 private static extern int SHFileOperation([In, Out] Shfileopstruct str);