_access

GetFileAttributes lies!

GetFileAttribuites, PathFileExists, CFile::GetStatus, and SHGetFileInfo may sometimes return inaccurate values. These functions may intermittently indicate that the file or directory does not exist, when it actually does exist, but never the other way around. I have not been able to replicate this issue with FindFirstFile, but this does not…

Best way to check if file or directory exists

A very common question is how do I check if a file or directory exists. However, there is already a problem. What exactly do you mean by "does file X exist?" Do you want to check if the file exists? do you want to check if the file exists *AND*…