Talk a little more about How to lock a file# Java - 爪哇娇娃
d*o
1 楼
Thank you very much for all the discussion here!
I tried different ways and there is no perfect solution so
far.
1. I'd like to bring up another issue here:
The reason I want to lock a file is to prevent any other
access. But the other program has to know when the file is
released. In another word, other program has to know if the
file is being used. Let me make an example here:
In COM programming, after we create an intance of a COM, we
can call AddRef and Release to check how many instances
I tried different ways and there is no perfect solution so
far.
1. I'd like to bring up another issue here:
The reason I want to lock a file is to prevent any other
access. But the other program has to know when the file is
released. In another word, other program has to know if the
file is being used. Let me make an example here:
In COM programming, after we create an intance of a COM, we
can call AddRef and Release to check how many instances