Skip to content

StorageFolder.CreateFile with CreationCollisionOption.ReplaceExisting does not empty an existing file #3123

Closed

Description

@jeromelaban

Current behavior

var storageFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(LocalSettingsKey, CreationCollisionOption.ReplaceExisting);

will not empty an existing file if it already exists.

Expected behavior

The file is emptied properly, and new data can be written to it.

Environment

Nuget Package: 2.3-dev

Activity

  1. added
    kind/bug
    on May 8, 2020
  2. MelbourneDeveloper commented on May 9, 2020

    @MelbourneDeveloper

    @jeromelaban it would probably also be good to implement the method:

    ApplicationData.Current.LocalFolder.GetFilesAsync()

  3. pkar70 commented on May 9, 2020

    @pkar70
    Contributor

    Implemented in #2774

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions