When is it okay to check if a file exists?

前端 未结 18 2377
再見小時候
再見小時候 2020-11-28 06:52

File systems are volatile. This means that you can\'t trust the result of one operation to still be valid for the next one, even if it\'s the next line of code. You can\'t

18条回答
  •  囚心锁ツ
    2020-11-28 07:17

    Your problem could easily be solved with basic computer science... read up on Semaphores.

    (I did not mean to sound like a jerk, I was just pointing you to a simple answer for a common problem).

提交回复
热议问题