Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: Correct values of CreationCollisionOption enum #11169

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions src/Uno.UWP/Storage/CreationCollisionOption.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Windows.Storage;

namespace Windows.Storage
/// <summary>
/// Specifies what to do if a file or folder with the specified name already exists in the current folder when you create a new file or folder.
/// </summary>
public enum CreationCollisionOption
{
public enum CreationCollisionOption
{
OpenIfExists,
ReplaceExisting,
GenerateUniqueName,
FailIfExists,
}
/// <summary>
/// Automatically append a number to the base of the specified name if the file or folder already exists.
/// For example, <c>if MyFile.txt</c> already exists, then the new file is named <c>MyFile (2).txt</c>.
/// If <c>MyFolder</c> already exists, then the new folder is named <c>MyFolder (2)</c>.
/// </summary>
GenerateUniqueName,

/// <summary>
/// Replace the existing item if the file or folder already exists.
/// </summary>
ReplaceExisting,

/// <summary>
/// Raise an exception of type System.Exception if the file or folder already exists.
/// Methods that don't explicitly pass a value from the CreationCollisionOption enumeration use the FailIfExists value as the default when you try to create, rename, copy, or move a file or folder.
/// </summary>
FailIfExists,

/// <summary>
/// Return the existing item if the file or folder already exists.
/// </summary>
OpenIfExists,
}