in reply to Re: Deciding for a file access method - requesting opinions
in thread Deciding for a file access method - requesting opinions
Do they indicate that you reading information from the file; manipulating it and then re-writing it in place with new values?
The user is supposed to convert the binary data into a JSON-representation (either as a file or in memory), modify it as required and then convert JSON back into the binary format.
And this "modifying the file during a parse / write is guaranteed to lead to inconsistency" indicates that there may be multiple concurrent accessors?
I'm reading a file. It's always possible someone is doing something stupif(1) and modifying / replacing the file while the tool is parsing it. A big fat "DON'T DO THAT" sticker is probably sufficient, but it would be nice to limit the exposure. Another way could be to calculate the file size / date / md5sum before and after parsing and repeat the parse if it changed unexpectedly.
(1) Nice typo.
P.S.: I already talked about the data format in a previous node
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Deciding for a file access method - requesting opinions
by BrowserUk (Patriarch) on Jul 14, 2015 at 21:49 UTC | |
by Monk::Thomas (Friar) on Jul 14, 2015 at 22:06 UTC | |
by BrowserUk (Patriarch) on Jul 15, 2015 at 14:30 UTC | |
by Monk::Thomas (Friar) on Jul 15, 2015 at 18:35 UTC |