This implements remove with a big constraint: only the last file can be removed. Otherwise, Error `Append_only is returned. The reason is removing the last file only requires overwriting the header and the following block with zeroes whereas removing files at other positions require moving potentially large amounts of data.
I believe I also found an off-by-one error when computing end sectors which this fixes as well.
This implements
remove
with a big constraint: only the last file can be removed. Otherwise,Error `Append_only
is returned. The reason is removing the last file only requires overwriting the header and the following block with zeroes whereas removing files at other positions require moving potentially large amounts of data.I believe I also found an off-by-one error when computing end sectors which this fixes as well.