示例#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));
        }
示例#2
0
文件: Win32.cs 项目: xc0102/OSUplayer
 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);
 }
示例#3
0
 private static extern int SHFileOperation([In, Out] Shfileopstruct str);