exam questions

Exam 70-357 All Questions

View all questions & answers for the 70-357 exam

Exam 70-357 topic 1 question 11 discussion

Actual exam question from Microsoft's 70-357
Question #: 11
Topic #: 1
[All 70-357 Questions]

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 users 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?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: 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 methods or passed to another app through app contracts.
Reference: https://docs.microsoft.com/en-us/uwp/api/windows.storage.storagefile

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
yapi
4 years, 6 months ago
GetParentAsync gets reference to folder, not file
upvoted 2 times
Leodolz
3 years, 10 months ago
That's why you use StorageFile.CreateStreamedFileAsync after getting the reference, answer is A
upvoted 1 times
...
...
liconnotalo
5 years, 7 months ago
What is the answer?
upvoted 1 times
dsvirdi
4 years, 9 months ago
Its A. Yes
upvoted 3 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago