public static int FileOperation(string Path, FileOperationType OperationType, FileOperationFlags Flags) { try { var fs = new ShFileOpStruct { Func = OperationType, From = Path + '\0' + '\0', Flags = Flags }; return(SHFileOperation(ref fs)); } catch (Exception) { return(-1); } }
public static extern int SHFileOperation(ref ShFileOpStruct FileOp);