JournaledFile 1.0 review
DownloadJournaledFile is a library that supports journaled transactional files.
|
|
JournaledFile is a library that supports journaled transactional files.
JournaledFile allows writes to be done to a file without risking file corruption in the event that the process or OS crashes or the power goes out.
Here are some key features of "JournaledFile":
for each write, it logs the file position, length of write and the data to a log file (file.log)
when JFile_sync() is called:
* it sets the log header status to "committed"
* the log writes are performed on output file
* the log file is truncated and it's status set to "uncommitted"
when JFile is opened, if it finds a log file then:
* if the log status is "committed":
it assumes the log did not complete it's write so it
writes the log to the file again and removes the log and lock
* if the log status is "uncommitted":
it assumes the log is not complete and removes it.
JournaledFile 1.0 keywords