I'm trying to delete a file but no matter what I try it doesn't seem to work. I set the file to read only using `setReadOnly()` and then immediately check to see if I can write to it and I can. I'm using windows and I have found that there could be bugs with these methods. Is there any way to completely close a file and cut off all access to make sure I can delete it? Where the file is coming from? Are you generating it in your code? If so please provide the code.
以上就是setReadOnly() vs canWrite()的详细内容,更多请关注web前端其它相关文章!