Skip to content

Commit

Permalink
Merge pull request #11169 from Youssef1313/creationcollisionoption
Browse files Browse the repository at this point in the history
fix!: Correct values of `CreationCollisionOption` enum
  • Loading branch information
MartinZikmund authored Feb 3, 2023
2 parents 2a96342 + aa8ef62 commit 2807e28
Showing 1 changed file with 27 additions and 11 deletions.
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,
}

0 comments on commit 2807e28

Please sign in to comment.