3 ms·
yeah it's horseshit. The picker just let's you pick a file path. The Win32 API also requires you to specify that you want to truncate the existing files. How
by muststopmyths 4y ago
yeah it's horseshit. The picker just let's you pick a file path.
The Win32 API also requires you to specify that you want to truncate the existing files.
How the fuck else would it work ? An additional OpenFileButTruncateExisting() API ?
A SaveFileAndOverwriteExisting() API ?
You can argue for those, but this thread is idiotic. He tries to furiously backpedal towards the end, but if he doesn't know the difference between a picker dialog and actually writing a file, I am not sure why I'd pay him any attention.
- Arnavion 4y agoNot only is the API called `FileSavePicker.PickSaveFileAsync` which any reasonable person would assume would give you a truncated file, but even Microsoft agrees that it should give you a truncated file. https://news.ycombinator.com/item?id=35277561 https://news.ycombinator.com/item?id=35277561
- JonChesterfield 4y ago`FileSavePicker.PickSaveFileAsync` manages to be redundant and ambiguous at the same time. Definitely wouldn't want to guess what that might do.
- mtVessel 4y agoSorry, my "reasonable" interpretation of the name tells me that it's a method to choose the file you want to save. It suggests absolutely nothing about actually writing data.
- Arnavion 4y agoNow continue reading the rest of the sentence.
- muststopmyths 4y agoyou are right. so it is the savefileandoverwriteexisting() api, with a bug. I stand corrected.