A Simple Question about File Status
-
Thanks very much for your reply. I think the funtion CFile::GetStatus() can only get the static status of a file, for example, the access mode of a file. But I want to get a dynamic status of a file, for example, the status of being read. Do you have better methods. Thanks for helping me. Maer.
-
Thanks very much for your reply. I think the funtion CFile::GetStatus() can only get the static status of a file, for example, the access mode of a file. But I want to get a dynamic status of a file, for example, the status of being read. Do you have better methods. Thanks for helping me. Maer.
-
I'm not sure what you mean by 'being read'. If you mean 'is the file being read from right now' I don't know but if you mean 'when was the file last accessed' I think you can use GetStatus(). /Per
Thanks for your reply. I find the "GetStatus" function works well. It really resolves a part of my trouble. What I mean is "the file being read from right now", I have find a better method to resolve the problem. That is, to set a status bit to show the status. My project often reads and writes a lot of datas. It often takes a lot of time to do that task. To be more efficient, I want to check out the status of the file to give notifications to other threads waiting for reading/writing in the same file. Thanks again. Maer.
-
Thanks for your reply. I find the "GetStatus" function works well. It really resolves a part of my trouble. What I mean is "the file being read from right now", I have find a better method to resolve the problem. That is, to set a status bit to show the status. My project often reads and writes a lot of datas. It often takes a lot of time to do that task. To be more efficient, I want to check out the status of the file to give notifications to other threads waiting for reading/writing in the same file. Thanks again. Maer.