i have a lot of thoughts here around testing that are unrelated to the problem you are trying to solve so i'm going to try really hard to avoid launching into them. when i've had to do this in the past for
RandomAccessFile
I have subclassed it and returned
false
from
delete()