CreationCollisionOption enumeration

1 out of 4 rated this helpful - Rate this topic

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

VersionAttribute(NTDDI_WIN8)

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

 

 

Build date: 2/25/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.