Closed kelbon closed 2 years ago
xlnt always overwrites the existing file with the full content. It supports reading and writing to an array of bytes if you want to write your own logic.
xlnt always overwrites the existing file with the full content. It supports reading and writing to an array of bytes if you want to write your own logic.
but is it exception/error safe? Can it break file while trying?
but is it exception/error safe? Can it break file while trying?
There are several places where the function could throw. To be safe, I would recommend writing to a new file and then overwrite the old file with the new file atomically with an OS function like std::filesystem::rename
.
What if file error and path was already used? Old file corrupted? Is exist a way to modify file and save it (without full rewrite?)