-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11169 from Youssef1313/creationcollisionoption
fix!: Correct values of `CreationCollisionOption` enum
- Loading branch information
Showing
1 changed file
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |