How does FileLock work?

前端 未结 5 2042
-上瘾入骨i
-上瘾入骨i 2020-11-30 11:14

I\'ve been trying to use FileLock to get exclusive access to a file in order to:

  • delete it
  • rename it
  • write to it

5条回答
  •  生来不讨喜
    2020-11-30 12:08

    Java file locks are specified only to protect against other locks, and nothing else. How they behave on specific platforms, i.e. any extra semantics, is platform-specific.

提交回复
热议问题