3 ms·
You’re forgetting this one: you can specify a flag that makes the call display a dialog box if a requested file does not exist. Yes, this call to open a file ca
by Someone 4y ago
You’re forgetting this one: you can specify a flag that makes the call display a dialog box if a requested file does not exist. Yes, this call to open a file can run an event loop that lets the user create directories, rename files, possibly even format floppy disks, etc.
If you want a prime example of a layer violation, this is it.
Its replacement “CreateFile” (https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea https://learn.microsoft.com/en-us/windows/win32/api/fileapi/...) is a lot saner, but still has this:
“If you rename or delete a file and then restore it shortly afterward, the system searches the cache for file information to restore. Cached information includes its short/long name pair and creation time.”
That’s intended to make it easier for “Save” operations in document-based applications to keep the short name of the file, creation time and file flags around.