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


public enum CreationCollisionOption

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. All rights reserved.