private static bool Send(string path, FileOperationAPIWrapper.FileOperationFlags flags) { try { FileOperationAPIWrapper.SHFILEOPSTRUCT FileOp = new FileOperationAPIWrapper.SHFILEOPSTRUCT() { wFunc = FileOperationAPIWrapper.FileOperationType.FO_DELETE, pFrom = path + (object)char.MinValue + (object)char.MinValue, fFlags = FileOperationAPIWrapper.FileOperationFlags.FOF_ALLOWUNDO | flags }; FileOperationAPIWrapper.SHFileOperation(ref FileOp); return(true); } catch (Exception ex) { return(false); } }
private static bool DeleteFile(string path, FileOperationAPIWrapper.FileOperationFlags flags) { try { FileOperationAPIWrapper.SHFILEOPSTRUCT FileOp = new FileOperationAPIWrapper.SHFILEOPSTRUCT() { wFunc = FileOperationAPIWrapper.FileOperationType.FO_DELETE, pFrom = path + "\0\0", fFlags = flags }; FileOperationAPIWrapper.SHFileOperation(ref FileOp); return(true); } catch (Exception ex) { return(false); } }
// Token: 0x0600097F RID: 2431 RVA: 0x003B6800 File Offset: 0x003B4A00 private static bool DeleteFile(string path, FileOperationAPIWrapper.FileOperationFlags flags) { bool result; try { FileOperationAPIWrapper.SHFILEOPSTRUCT sHFILEOPSTRUCT = new FileOperationAPIWrapper.SHFILEOPSTRUCT { wFunc = FileOperationAPIWrapper.FileOperationType.FO_DELETE, pFrom = path + "\0\0", fFlags = flags }; FileOperationAPIWrapper.SHFileOperation(ref sHFILEOPSTRUCT); result = true; } catch (Exception) { result = false; } return(result); }