[問題] 如何得知file可以讀取
有個程式執行時會把某一txt鎖住
我的java程式就不能讀取了,請問要如何得知目前不能讀取呢?
目前的情況他會直接跳
java.io.FileNotFoundException
(The process cannot access the file because it is being used by another
process)
我想要在不能讀取時做些處理
已嘗試使用
canRead
canWrite
皆無法正確得知
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.71.214.40
推
06/04 13:49, , 1F
06/04 13:49, 1F
→
06/04 14:24, , 2F
06/04 14:24, 2F
→
06/04 21:09, , 3F
06/04 21:09, 3F