Exemple #1
0
        void OnDelete()
        {
            if (File.Exists(FileName))
            {
                if (Shell32.FileOperation(FileName, FileOperationType.Delete, 0) != 0)
                {
                    return;
                }
            }

            // Remove from List
            RemoveRequested?.Invoke();
        }
Exemple #2
0
 public bool DeleteFile(string filePath)
 {
     return(Shell32.FileOperation(filePath, FileOperationType.Delete, 0) == 0);
 }