made mindmapping app uwp month ago.
the file handling managed app:
- the files auto saved
- the files stored in localfolder
- i use queue file operations (see code)
the files saved transactional, see following snippet
using (storagestreamtransaction transaction = await file.opentransactedwriteasync()) { jsondocumentserializer.serialize(history, transaction.stream.asstreamforwrite()); await transaction.commitasync(); }
jsondocumentserializer wrapper around jsonserializer.
from time time bug reports users, file gets corrupt, e.g. file seems have correct size empty or have json written file.
how can happen?
Comments
Post a Comment