PrepAway - Latest Free Exam Questions & Answers

Does this meet the goal?

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine whether the solution meets the stated goals.
You are developing a Universal Windows Platform (UWP) app.
Your app stores files on a user’s device.
You need to be able to replace the existing files with new files generated by the user.
Solution: You run the StorageFile.GetParentAsync method to get a reference to the existing file. Then, you run the StorageFile.CreateStreamedFileAsync method to create the new file at the same location.
Does this meet the goal? methods or passed to another app through app contracts.

PrepAway - Latest Free Exam Questions & Answers

A.
Yes

B.
No

Explanation:
The GetParentAsync() method gets the parent folder of the current file.
The CreateStreamedFileAsync method can be used to create a StorageFile that can be passed to other
https://docs.microsoft.com/en-us/uwp/api/windows.storage.storagefile

One Comment on “Does this meet the goal?

  1. pro says:

    It’s really weird answer.

    First of all StorageFile.GetParentAsync returns the StorageFolder. And then StorageFile.CreateStreamedFileAsync does not use any storage folders. And to replace the file we should call StorageFile.ReplaceWithStreamedFileAsync(newStorageFile, …).

    As a result, the answer should be “B”.




    15



    1

Leave a Reply