private Task VerifyStateAsync(IProjectTree node, string path) { if (_isFolder != node.IsFolder) { throw new IOException(string.Format(CultureInfo.CurrentCulture, Resources.SpecialFileProvider_FileOrFolderAlreadyExists, node.Caption), Win32Interop.HResultFromWin32(Win32Interop.ERROR_FILE_EXISTS)); } if (!node.Flags.IsIncludedInProject()) { // Excluded from project return(AddFileAsync(path)); } if (node.Flags.IsMissingOnDisk()) { // Project includes it, but missing from disk return(CreateFileAsync(path)); } return(Task.CompletedTask); }