31 ms·
I don't think I have one unfortunately. It depends greatly on the scenario. Usually I'd say come up with a unique name if you can. Otherwise I'd say try to o
by asveikau 10y ago
I don't think I have one unfortunately. It depends greatly on the scenario.
Usually I'd say come up with a unique name if you can. Otherwise I'd say try to overwrite (possibly overwrite via rename, rather than CreateFile, to avoid the data loss you mention).
I've even written some code to rename to a unique name first, then delete.