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)); }
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); }
private static extern int SHFileOperation([In, Out] Shfileopstruct str);