Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CreationCollisionOption enumeration

Applies to Windows and Windows Phone

Specifies what to do if a file with the desired name already exists in the current folder.

Syntax


var value = Windows.Storage.CreationCollisionOption.generateUniqueName;

Attributes

[Version(0x06020000)]

Members

The CreationCollisionOption enumeration has these members.

MemberValueDescription
GenerateUniqueName | generateUniqueName0

Create the new file or folder with the desired name, or automatically appends a number if a file or folder already exists with that name.

ReplaceExisting | replaceExisting1

Create the new file or folder with the desired name, and replaces any file or folder that already exists with that name.

FailIfExists | failIfExists2

Create the new file or folder with the desired name, or returns an error if a file or folder already exists with that name.

OpenIfExists | openIfExists3

Create the new file or folder with the desired name, or returns an existing item if a file or folder already exists with that name.

Remarks

For methods with overloads that take a CreationCollisionOption, the FailIfExists is used if another CreationCollisionOption is not specified.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft